Style, small fixes, Windows single file

This commit is contained in:
2022-01-07 11:08:56 +01:00
parent ee82603f2f
commit e4dde1181c
5 changed files with 20 additions and 3 deletions

17
.vscode/tasks.json vendored
View File

@@ -42,6 +42,23 @@
],
"problemMatcher": "$msCompile"
},
{
"label": "publish singlefile windows",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/src/FileTime.ConsoleUI/FileTime.ConsoleUI.csproj",
"-p:PublishSingleFile=true",
"-c",
"Release",
"-r",
"win-x64",
"--self-contained",
"true"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",

View File

@@ -237,6 +237,7 @@ namespace FileTime.ConsoleUI.App.UI
Console.SetCursorPosition(startX, startY + currentY++);
_coloredRenderer.Write($"{{0,-{elementWidth}}}", _paddingLeft + "<empty>" + _paddingRight);
printedItemsCount++;
}
var padding = new string(' ', elementWidth);

View File

@@ -37,7 +37,7 @@ namespace FileTime.ConsoleUI.App.UI
ElementBackground = new BasicColor(Console.BackgroundColor);
ElementForeground = new BasicColor(Console.ForegroundColor);
ElementSpecialForeground = new BasicColor(ConsoleColor.DarkGreen);
SelectedItemForeground = new BasicColor(ConsoleColor.DarkCyan);
SelectedItemForeground = new BasicColor(ConsoleColor.DarkYellow);
ErrorColor = new BasicColor(ConsoleColor.Red);
AccentForeground = new BasicColor(ConsoleColor.Green);

View File

@@ -100,7 +100,7 @@ namespace FileTime.ConsoleUI
private static ServiceProvider CreateServiceProvider()
{
return new ServiceCollection()
.AddLogging((builder) => builder.AddConsole().AddDebug())
.AddLogging(/* (builder) => builder.AddConsole().AddDebug() */)
.AddSingleton<Application>()
.AddSingleton<IStyles>(new Styles(IsAnsiColorSupported()))
.AddSingleton<IColoredConsoleRenderer, ColoredConsoleRenderer>()

View File

@@ -48,7 +48,6 @@ namespace FileTime.Providers.Local
var pathParts = (IsCaseInsensitive ? path.ToLower() : path).TrimStart(Constants.SeparatorChar).Split(Constants.SeparatorChar);
var rootContainer = RootContainers.FirstOrDefault(c => NormalizePath(c.Name) == NormalizePath(pathParts[0]));
_logger.LogError("No root container found with name '{0}'", path[0]);
if (rootContainer == null)
{
_logger.LogWarning("No root container found with name '{0}'", path[0]);