use custom drawer container

This commit is contained in:
Matt Parker
2025-08-06 19:11:07 +10:00
parent 242defb3da
commit 4aae23c6f8
3 changed files with 25 additions and 19 deletions

View File

@@ -9,7 +9,7 @@
<ItemGroup> <ItemGroup>
<!-- If any Microsoft.Build.dll ends up in the output, it will be prioritised for loading by MSBuild Nodes --> <!-- If any Microsoft.Build.dll ends up in the output, it will be prioritised for loading by MSBuild Nodes -->
<PackageReference Include="Ardalis.GuardClauses" Version="5.0.0" /> <PackageReference Include="Ardalis.GuardClauses" Version="5.0.0" />
<PackageReference Include="AsyncReadProcess" Version="1.0.0-preview4" /> <PackageReference Include="AsyncReadProcess" Version="1.0.0-preview5" />
<PackageReference Include="Microsoft.Build" Version="17.14.8" ExcludeAssets="runtime" /> <PackageReference Include="Microsoft.Build" Version="17.14.8" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.Build.Framework" Version="17.14.8" ExcludeAssets="runtime" /> <PackageReference Include="Microsoft.Build.Framework" Version="17.14.8" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.Build.Locator" Version="1.9.1" /> <PackageReference Include="Microsoft.Build.Locator" Version="1.9.1" />

View File

@@ -8,7 +8,7 @@
@inject BuildService BuildService @inject BuildService BuildService
@inject AppState AppState @inject AppState AppState
<MudLayout> <MudLayout Style="height: 100%">
<MudAppBar Dense="true" Gutters="false" Class="px-2"> <MudAppBar Dense="true" Gutters="false" Class="px-2">
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="1"> <MudStack Row="true" AlignItems="AlignItems.Center" Spacing="1">
<MudButton OnClick="@DrawerToggle" Style="min-width: 20px;"> <MudButton OnClick="@DrawerToggle" Style="min-width: 20px;">
@@ -40,21 +40,27 @@
</MudButton> </MudButton>
</MudStack> </MudStack>
</MudAppBar> </MudAppBar>
<MudDrawer @bind-Open="@_drawerOpen" Width="400px" ClipMode="DrawerClipMode.Always">
@if (_solutionFilePath is not null) <MudMainContent Style="height: 100%">
{ <MudPaper Height="100%" Class="" Style="overflow:hidden; position:relative;">
<SolutionExplorer @bind-SelectedFile="@_selectedFile" SolutionModel="@_solutionModel"/> <MudDrawerContainer Style="height: 100%" Class="mud-height-full">
} <MudDrawer @bind-Open="@_drawerOpen" Style="height: 100%" Width="400px" Fixed="false" Elevation="0" Variant="@DrawerVariant.Persistent">
@* <NavMenu/> *@ @if (_solutionFilePath is not null)
</MudDrawer> {
<MudMainContent> <SolutionExplorer @bind-SelectedFile="@_selectedFile" SolutionModel="@_solutionModel"/>
<MudContainer MaxWidth="MaxWidth.False" Class="mt-2"> }
@* @Body *@ </MudDrawer>
@if (_solutionFilePath is not null) <div class="d-flex justify-center align-center mud-height-full">
{ <MudContainer MaxWidth="MaxWidth.False" Class="mt-2">
<CodeViewer SelectedFile="@_selectedFile" /> @* @Body *@
} @if (_solutionFilePath is not null)
</MudContainer> {
<CodeViewer SelectedFile="@_selectedFile" />
}
</MudContainer>
</div>
</MudDrawerContainer>
</MudPaper>
</MudMainContent> </MudMainContent>
<MudDrawer @bind-Open="@_terminalDrawerOpen" Elevation="2" Variant="DrawerVariant.Temporary" Overlay="false" Anchor="Anchor.Bottom"> <MudDrawer @bind-Open="@_terminalDrawerOpen" Elevation="2" Variant="DrawerVariant.Temporary" Overlay="false" Anchor="Anchor.Bottom">
@if (_solutionFilePath is not null) @if (_solutionFilePath is not null)

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html style="background-color: #32333d"> <html style="background-color: #32333d; height: 100%">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
@@ -10,7 +10,7 @@
<link href="_content/XtermBlazor/XtermBlazor.min.css" rel="stylesheet" /> <link href="_content/XtermBlazor/XtermBlazor.min.css" rel="stylesheet" />
<link href="SharpIDE.Photino.styles.css" rel="stylesheet" /> <link href="SharpIDE.Photino.styles.css" rel="stylesheet" />
</head> </head>
<body> <body style="height: 100%">
<app>Loading...</app> <app>Loading...</app>
<div id="blazor-error-ui"> <div id="blazor-error-ui">