terminal in drawer

This commit is contained in:
Matt Parker
2025-08-01 18:06:11 +10:00
parent e756600b97
commit 8cda80cefe

View File

@@ -16,9 +16,14 @@
<MudButton Variant="Variant.Outlined" Size="Size.Small" Color="Color.Primary" OnClick="@RestoreSolution">Restore</MudButton> <MudButton Variant="Variant.Outlined" Size="Size.Small" Color="Color.Primary" OnClick="@RestoreSolution">Restore</MudButton>
</MudButtonGroup> </MudButtonGroup>
<MudSpacer /> <MudSpacer />
<MudButton> <MudStack Row="true" AlignItems="AlignItems.Center">
<MudIcon Icon="@Icons.Material.Filled.PlayArrow" Size="Size.Medium" Color="Color.Success" /> <MudButton OnClick="@TerminalDrawerToggle">
</MudButton> <MudIcon Icon="@Icons.Material.Filled.Terminal" Size="Size.Medium" Color="Color.Default" />
</MudButton>
<MudButton>
<MudIcon Icon="@Icons.Material.Filled.PlayArrow" Size="Size.Medium" Color="Color.Success" />
</MudButton>
</MudStack>
</MudAppBar> </MudAppBar>
<MudDrawer @bind-Open="@_drawerOpen" Width="400px" ClipMode="DrawerClipMode.Always"> <MudDrawer @bind-Open="@_drawerOpen" Width="400px" ClipMode="DrawerClipMode.Always">
@if (_solutionFilePath is not null) @if (_solutionFilePath is not null)
@@ -35,17 +40,25 @@
<CodeViewer SelectedFile="@_selectedFile" /> <CodeViewer SelectedFile="@_selectedFile" />
} }
</MudContainer> </MudContainer>
<TerminalOutputDisplay />
</MudMainContent> </MudMainContent>
<MudDrawer @bind-Open="@_terminalDrawerOpen" Variant="DrawerVariant.Temporary" Anchor="Anchor.Bottom">
<MudText>Terminal</MudText>
<TerminalOutputDisplay />
</MudDrawer>
</MudLayout> </MudLayout>
@code { @code {
bool _drawerOpen = true; bool _drawerOpen = true;
bool _terminalDrawerOpen = false;
void DrawerToggle() void DrawerToggle()
{ {
_drawerOpen = !_drawerOpen; _drawerOpen = !_drawerOpen;
} }
void TerminalDrawerToggle()
{
_terminalDrawerOpen = !_terminalDrawerOpen;
}
private string? _solutionFilePath; private string? _solutionFilePath;
private SharpIdeSolutionModel? _solutionModel; private SharpIdeSolutionModel? _solutionModel;