styling
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
<MudTreeView T="ProjectInSolution" Dense="true">
|
||||
<MudTreeView T="ProjectInSolution" Dense="true" >
|
||||
@foreach(var project in _rootNodes)
|
||||
{
|
||||
@GetProjectFragment(project)
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
private SolutionFile _solutionFile = null!;
|
||||
private List<ProjectInSolution> _rootNodes = [];
|
||||
private Dictionary<string, Folder> _folders = new();
|
||||
private Dictionary<string, Folder?> _folders = new();
|
||||
|
||||
private RenderFragment GetProjectFragment(ProjectInSolution project) =>
|
||||
@<text>
|
||||
<MudTreeViewItem Value="project" Text="@project.ProjectName">
|
||||
<MudTreeViewItem TextTypo="Typo.body2" Icon="@Icons.Material.Filled.Folder" IconColor="Color.Primary" Value="project" Text="@project.ProjectName">
|
||||
@foreach(var child in _solutionFile.ProjectsByGuid.Values.Where(s => s.ParentProjectGuid == project.ProjectGuid).OrderBy(s => s.ProjectName))
|
||||
{
|
||||
@GetProjectFragment(child)
|
||||
@@ -38,7 +38,7 @@
|
||||
@<text>
|
||||
@foreach (var subFolder in folder.Folders)
|
||||
{
|
||||
<MudTreeViewItem @bind-Expanded="subFolder.Expanded" T="ProjectInSolution" Text="@subFolder.Name">
|
||||
<MudTreeViewItem TextTypo="Typo.body2" @bind-Expanded="subFolder.Expanded" T="ProjectInSolution" Text="@subFolder.Name">
|
||||
@if (subFolder.Expanded)
|
||||
{
|
||||
@GetFolderFragment(subFolder)
|
||||
@@ -47,11 +47,16 @@
|
||||
}
|
||||
@foreach (var file in folder.Files)
|
||||
{
|
||||
<MudTreeViewItem T="ProjectInSolution" Text="@file.Name" />
|
||||
<MudTreeViewItem TextTypo="Typo.body2" T="ProjectInSolution" Text="@file.Name" />
|
||||
}
|
||||
</text>;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await Task.Run(() => LoadSolution("D:/matth/Documents/Git/amazon/ClientPortal.sln"));
|
||||
}
|
||||
|
||||
private void LoadSolution(string solutionPath)
|
||||
{
|
||||
var solutionFile = GetNodesInSolution.ParseSolutionFileFromPath("D:/matth/Documents/Git/amazon/ClientPortal.sln");
|
||||
ArgumentNullException.ThrowIfNull(solutionFile);
|
||||
@@ -74,7 +79,7 @@
|
||||
return (s, rootFolder);
|
||||
})
|
||||
.ToDictionary(s => s.s.ProjectGuid, s => s.Item2);
|
||||
_folders = folders2;
|
||||
_folders = folders2!;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<MudAppBar Dense="true">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Menu" Color="Color.Inherit" Edge="Edge.Start" OnClick="@((e) => DrawerToggle())" />
|
||||
</MudAppBar>
|
||||
<MudDrawer @bind-Open="@_drawerOpen" ClipMode="DrawerClipMode.Always">
|
||||
<MudDrawer @bind-Open="@_drawerOpen" Width="400px" ClipMode="DrawerClipMode.Always">
|
||||
<SolutionExplorer />
|
||||
@* <NavMenu/> *@
|
||||
</MudDrawer>
|
||||
|
||||
Reference in New Issue
Block a user