Skip to content

Commit

Permalink
imp - Development warning message adjusted
Browse files Browse the repository at this point in the history
---

We've adjusted a message for the development warning if the user has stylish splash screen disabled.

---

Type: imp
Breaking: False
Doc Required: False
Backport Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Jun 20, 2024
1 parent e7867cf commit 3dbd5b8
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions public/Nitrocid/ConsoleBase/Writers/MiscWriters/WelcomeMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
using Textify.General;
using Terminaux.Base;
using Terminaux.Inputs;
using Terminaux.Reader;
using System;

namespace Nitrocid.ConsoleBase.Writers.MiscWriters
{
Expand Down Expand Up @@ -152,7 +154,6 @@ internal static void ShowDevelopmentDisclaimer()
Translate.DoTranslation("We recommend against running this version of the kernel, because it is unsupported. If you have downloaded this kernel from unknown sources, this message may appear. Please download from our official downloads page.")
#endif
;
string tip = Translate.DoTranslation("To dismiss forever, either press ENTER on the \"Acknowledged\" button here by highlighting it using the left arrow on your keyboard, or enable \"Development notice acknowledged\" in the kernel settings.");

// Show development disclaimer
if (SplashManager.EnableSplash)
Expand All @@ -164,14 +165,21 @@ internal static void ShowDevelopmentDisclaimer()
int answer = InfoBoxButtonsColor.WriteInfoBoxButtonsColor(
Translate.DoTranslation("Development notice"),
answers,
$"{message}\n\n{tip}",
$"{message}\n\n" +
$"{Translate.DoTranslation("To dismiss forever, either press ENTER on the \"Acknowledged\" button here by highlighting it using the left arrow on your keyboard, or enable \"Development notice acknowledged\" in the kernel settings.")}",
KernelColorTools.GetColor(KernelColorType.DevelopmentWarning)
);
if (answer == 1)
Config.MainConfig.DevNoticeConsented = true;
}
else
TextWriters.Write($"* {message}\n* {tip}", true, KernelColorType.DevelopmentWarning);
{
TextWriters.Write($" * {message}", true, KernelColorType.DevelopmentWarning);
TextWriters.Write($" * {Translate.DoTranslation("To dismiss forever, either press ENTER on your keyboard, or enable \"Development notice acknowledged\" in the kernel settings. Any other key goes ahead without acknowledgement.")}", true, KernelColorType.DevelopmentWarning);
var key = TermReader.ReadKey(true);
if (key.Key == ConsoleKey.Enter)
Config.MainConfig.DevNoticeConsented = true;
}
#endif
}

Expand Down

0 comments on commit 3dbd5b8

Please sign in to comment.