🐛 Fix bug in render top level.

This commit is contained in:
Kolosov Alexandr 2024-06-13 14:07:45 +05:00
parent 3a85bfbdd3
commit a06f5c541e
4 changed files with 17 additions and 18 deletions

View File

@ -24,7 +24,7 @@ public class PanelComponent : ComponentBase, IComponent
builder.Append(Angles.LeftTop); builder.Append(Angles.LeftTop);
builder.Append(Lines.Horizontal.Repeat(halfWidth)); builder.Append(Lines.Horizontal.Repeat(halfWidth));
builder.AppendFormat("{0}{1}{0}", Space.Repeat(Convert.ToInt32(Indentation.Default)), title); builder.AppendFormat("{0}{1}{0}", Space.Repeat(Convert.ToInt32(Indentation.Default)), title);
builder.Append(Lines.Horizontal.Repeat(halfWidth)); builder.Append(Lines.Horizontal.Repeat(halfWidth + halfWidth % 2));
builder.Append(Angles.RightTop); builder.Append(Angles.RightTop);
builder.Append(LineBreak); builder.Append(LineBreak);
} }

View File

@ -13,7 +13,7 @@ public class DashboardContainer : ContainerBase
public DashboardContainer() public DashboardContainer()
{ {
var panel = new PanelComponent(" ".Info() + "Dependencies".Main()); var panel = new PanelComponent(" ".Info() + " Dependencies".Main());
_content = new ContentContainer(); _content = new ContentContainer();
_content.SetOrientationVertical(); _content.SetOrientationVertical();
SetOrientationVertical(); SetOrientationVertical();

View File

@ -33,7 +33,7 @@ public class DependenciesPage : PageBase
dashboard.AddChildren(projectDependencies); dashboard.AddChildren(projectDependencies);
} }
var breadCrumbs = new BreadCrumbsComponent(" dependencies", "JavaScript"); var breadCrumbs = new BreadCrumbsComponent(" Dependencies", "JavaScript");
var footer = new FooterContainer(breadCrumbs); var footer = new FooterContainer(breadCrumbs);
var layout = new DashboardLayout(header, dashboard, footer); var layout = new DashboardLayout(header, dashboard, footer);
canvas.Draw(layout); canvas.Draw(layout);

View File

@ -8,11 +8,10 @@ Console.CursorVisible = false;
var welcomePage = new WelcomePage(); var welcomePage = new WelcomePage();
welcomePage.Open(); welcomePage.Open();
Thread.Sleep(2000); Thread.Sleep(500);
var dependenciesPage = new DependenciesPage(); var dependenciesPage = new DependenciesPage();
dependenciesPage.Open(); dependenciesPage.Open();
// display.OpenDeps(settings.Projects[0]);
var key = new ConsoleKeyInfo('1', ConsoleKey.NoName, false, false, false); var key = new ConsoleKeyInfo('1', ConsoleKey.NoName, false, false, false);
var waitCommand = true; var waitCommand = true;