From a8bca447a2932dc4a2bb8dcd7bf49f3bd19daae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80=20?= =?UTF-8?q?=D0=9A=D0=BE=D0=BB=D0=BE=D1=81=D0=BE=D0=B2?= Date: Fri, 1 Nov 2024 17:38:32 +0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20bug.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/TUI/Program.cs | 39 +------------------ .../Dependencies/DependencyRepository.cs | 1 - src/TUI/Store/DependenciesStore.cs | 19 +++++---- 3 files changed, 13 insertions(+), 46 deletions(-) diff --git a/src/TUI/Program.cs b/src/TUI/Program.cs index 682e0a6..c5120cb 100644 --- a/src/TUI/Program.cs +++ b/src/TUI/Program.cs @@ -42,42 +42,7 @@ do key = Console.ReadKey(true); break; } - - // if (display.CommandLine.IsFocused) - // { - // switch (key.Key) - // { - // case ConsoleKey.Escape: - // display.CommandLine.IsFocused = false; - // break; - // default: - // Console.Write(key.KeyChar); - // - // break; - // } - // } - // else - // { - // switch (key.KeyChar) - // { - // case ':': - // display.OpenCommandLine(); - // break; - // } - // - // switch (key.Key) - // { - // case ConsoleKey.DownArrow: - // display.Next(); - // break; - // case ConsoleKey.UpArrow: - // display.Previous(); - // break; - // case ConsoleKey.E: - // display.Toggle(); - // break; - // } - // } } while (waitCommand); -Console.Clear(); \ No newline at end of file +Console.Clear(); +Console.CursorVisible = true; \ No newline at end of file diff --git a/src/TUI/Providers/Dependencies/DependencyRepository.cs b/src/TUI/Providers/Dependencies/DependencyRepository.cs index d13627e..45ac9d9 100644 --- a/src/TUI/Providers/Dependencies/DependencyRepository.cs +++ b/src/TUI/Providers/Dependencies/DependencyRepository.cs @@ -1,6 +1,5 @@ using System.Text.Json; using System.Text.Json.Nodes; -using TUI.Controls.Components; using TUI.Domain; using YamlDotNet.Serialization; using YamlDotNet.Serialization.NamingConventions; diff --git a/src/TUI/Store/DependenciesStore.cs b/src/TUI/Store/DependenciesStore.cs index 8d4b8a9..9d8c9d4 100644 --- a/src/TUI/Store/DependenciesStore.cs +++ b/src/TUI/Store/DependenciesStore.cs @@ -1,3 +1,4 @@ +using System.Diagnostics; using TUI.Controls.Components; using TUI.Domain; using TUI.Engine; @@ -9,31 +10,33 @@ namespace TUI.Store; public class DependenciesStore { public IEnumerable ConventionDependencies; - + public IEnumerable Projects; - + private DependencyRepository Repository = new(); - + public IEnumerable ActualDependencies(Project project) { - SpeakerComponent.Instance.Shout(Symbols.Download.Info(), $"Fetch actual dependencies for project {project.Name.Main - ()}"); + SpeakerComponent.Instance.Shout(Symbols.Download.Info(), + $"Fetch actual dependencies for project {project.Name.Main()}"); + try { return Repository.ReadActual(project); } - catch + catch(Exception ex) { + Debugger.Log(0, "error", ex.Message); SpeakerComponent.Instance.Shout(Symbols.Error.Error(), $"Fetch failed for project{project.Name}"); return new List(); } } - + public void Bind() { SpeakerComponent.Instance.Shout("🤔", "Prepare javascript conventions"); ConventionDependencies = Repository.ReadConventions("javascript"); - + SpeakerComponent.Instance.Shout("🤩", "Prepare javascript projects"); Projects = Repository.ReadProjects("javascript"); }