Skip to content

Commit 6c1ebcc

Browse files
committed
add - doc - Added mail TUI
--- We've added the mail TUI. --- Type: add Breaking: False Doc Required: True Backport Required: False Part: 1/1
1 parent 7ccf598 commit 6c1ebcc

File tree

5 files changed

+482
-3
lines changed

5 files changed

+482
-3
lines changed

public/Nitrocid.Addons/Nitrocid.Extras.MailShell/Mail/Commands/LsDirs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class LsDirsCommand : BaseCommand, ICommand
3535

3636
public override int Execute(CommandParameters parameters, ref string variableValue)
3737
{
38-
TextWriters.Write(MailDirectory.MailListDirectories(), false, KernelColorType.NeutralText);
38+
TextWriters.Write(MailDirectory.MailRenderListDirectories(), false, KernelColorType.NeutralText);
3939
return 0;
4040
}
4141
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
//
2+
// Nitrocid KS Copyright (C) 2018-2025 Aptivi
3+
//
4+
// This file is part of Nitrocid KS
5+
//
6+
// Nitrocid KS is free software: you can redistribute it and/or modify
7+
// it under the terms of the GNU General Public License as published by
8+
// the Free Software Foundation, either version 3 of the License, or
9+
// (at your option) any later version.
10+
//
11+
// Nitrocid KS is distributed in the hope that it will be useful,
12+
// but WITHOUT ANY WARRANTY, without even the implied warranty of
13+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
// GNU General Public License for more details.
15+
//
16+
// You should have received a copy of the GNU General Public License
17+
// along with this program. If not, see <https://www.gnu.org/licenses/>.
18+
//
19+
20+
using Terminaux.Inputs.Interactive;
21+
using Nitrocid.Shell.ShellBase.Commands;
22+
using Nitrocid.Languages;
23+
using System;
24+
using Nitrocid.Extras.MailShell.Mail.Interactive;
25+
using MailKit;
26+
using MimeKit;
27+
28+
namespace Nitrocid.Extras.MailShell.Mail.Commands
29+
{
30+
class TuiCommand : BaseCommand, ICommand
31+
{
32+
33+
public override int Execute(CommandParameters parameters, ref string variableValue)
34+
{
35+
var tui = new MailManagerCli();
36+
tui.Bindings.Add(new InteractiveTuiBinding<MailFolder, MimeMessage>(Translate.DoTranslation("Open"), ConsoleKey.Enter, (entry1, _, entry2, _) => tui.Open(entry1, entry2)));
37+
InteractiveTuiTools.OpenInteractiveTui(tui);
38+
return 0;
39+
}
40+
}
41+
}

0 commit comments

Comments
 (0)