11// Deci SmartImage.Rdx CliFormat.Elements.cs
22// $File.CreatedYear-$File.CreatedMonth-26 @ 1:25
33
4- using System . Collections . ObjectModel ;
54using SmartImage . Lib . Engines ;
65using Spectre . Console ;
76
@@ -12,22 +11,22 @@ internal static partial class CliFormat
1211
1312 // Ideally a dictionary would be used here...
1413
15- internal static readonly Style s_styleName = new ( decoration : Decoration . Italic ) ;
14+ internal static readonly Style Sty_Name = new ( decoration : Decoration . Italic ) ;
1615
17- internal static readonly Style s_styleSim = new ( Color . Wheat1 , decoration : Decoration . None ) ;
16+ internal static readonly Style Sty_Sim = new ( Color . Wheat1 , decoration : Decoration . None ) ;
1817
19- internal static readonly Style s_styleUrl = new ( Color . Cyan1 , decoration : Decoration . None ) ;
18+ internal static readonly Style Sty_Url = new ( Color . Cyan1 , decoration : Decoration . None ) ;
2019
21- public static readonly Color Color1 = new ( 0x80 , 0xFF , 0x80 ) ;
20+ public static readonly Color Clr_Misc1 = new ( 0x80 , 0xFF , 0x80 ) ;
2221
23- internal static readonly Text EmptyText = new ( string . Empty ) ;
22+ internal static readonly Text Txt_Empty = new ( string . Empty ) ;
2423
2524 internal const string STR_DEFAULT = "-" ;
2625
2726 static CliFormat ( ) { }
2827
2928 internal static readonly IReadOnlyDictionary < SearchEngineOptions , Color > EngineColors =
30- new Dictionary < SearchEngineOptions , Color > ( )
29+ new Dictionary < SearchEngineOptions , Color >
3130 {
3231 { SearchEngineOptions . SauceNao , Color . Green } ,
3332 { SearchEngineOptions . EHentai , Color . Purple } ,
@@ -43,4 +42,24 @@ static CliFormat() { }
4342
4443 internal static readonly Capabilities ProfileCapabilities = AConsole . Profile . Capabilities ;
4544
45+ internal static readonly bool IsLinux = OperatingSystem . IsLinux ( ) ;
46+ internal static readonly bool IsWindows = OperatingSystem . IsWindows ( ) ;
47+ internal static readonly bool IsMacOs = OperatingSystem . IsMacOS ( ) ;
48+
49+ public static Grid CreateInfoGrid ( )
50+ {
51+ var grd = new Grid ( ) ;
52+ grd . AddColumns ( 2 ) ;
53+
54+ grd . AddRow ( "OS" , $ "{ GetOS ( ) } / { Environment . OSVersion } ") ;
55+ grd . AddRow ( "Runtime" , $ "{ Environment . Version } ") ;
56+
57+ grd . AddRow ( "Terminal ANSI" , $ "{ ProfileCapabilities . Ansi } ") ;
58+ grd . AddRow ( "Terminal colors" , $ "{ ProfileCapabilities . ColorSystem } ") ;
59+ grd . AddRow ( "Terminal links" , $ "{ ProfileCapabilities . Links } ") ;
60+ grd . AddRow ( "Terminal Unicode" , $ "{ ProfileCapabilities . Unicode } ") ;
61+
62+ return grd ;
63+ }
64+
4665}
0 commit comments