|
1 | 1 | @page "/snippet/{snippetId?}" |
2 | 2 | @layout MainLayout |
3 | 3 |
|
| 4 | +<style> |
| 5 | + .try-drawer { |
| 6 | + width: var(--mud-drawer-width-mini-left) !important; |
| 7 | + overflow: hidden; |
| 8 | + } |
| 9 | + .try-editor { |
| 10 | + margin-left: var(--mud-drawer-width-mini-left) !important; |
| 11 | + } |
| 12 | + .try-avatar { |
| 13 | + border-color: var(--try-drawer-text); |
| 14 | + color: var(--try-drawer-text); |
| 15 | + } |
| 16 | +</style> |
| 17 | + |
4 | 18 | <div class="try-layout"> |
5 | | - <MudDrawer Fixed="false" Elevation="1" Variant="@DrawerVariant.Mini" Class="try-drawer"> |
6 | | - <MudIconButton title="Run (Ctrl + S)" OnClick="@CompileAsync" Disabled="@Loading" Icon="@Icons.Material.Rounded.PlayArrow" Color="@(LayoutService.IsDarkMode ? Color.Success : Color.Inherit)" /> |
| 19 | + <MudDrawer Open="true" Fixed="false" Elevation="1" Variant="@DrawerVariant.Persistent" Class="try-drawer mud-drawer-mini"> |
| 20 | + <MudTooltip Text="Run your code"> |
| 21 | + <MudIconButton title="Run (Ctrl + S)" OnClick="@CompileAsync" Disabled="@Loading" Icon="@Icons.Material.Rounded.PlayArrow" Color="@(LayoutService.IsDarkMode ? Color.Success : Color.Inherit)" /> |
| 22 | + </MudTooltip> |
7 | 23 | <MudTooltip Text="Save or Share" Delay="800" Arrow="true" Placement="Placement.Right" Color="Color.Dark"> |
8 | 24 | <SaveSnippetPopup @bind-Visible="SaveSnippetPopupVisible" CodeFiles="@CodeFiles.Values" UpdateActiveCodeFileContentAction="UpdateActiveCodeFileContent" /> |
9 | 25 | <MudIconButton OnClick="ShowSaveSnippetPopup" Icon="@Icons.Material.Outlined.Save" Color="@(LayoutService.IsDarkMode ? Color.Info : Color.Inherit)" /> |
|
12 | 28 | <MudIconButton OnClick="@UpdateTheme" Icon="@(LayoutService.IsDarkMode ? @Icons.Material.Rounded.LightMode : @Icons.Material.Outlined.DarkMode)" Color="@(LayoutService.IsDarkMode ? Color.Warning : Color.Inherit)" /> |
13 | 29 | </MudTooltip> |
14 | 30 | <MudSpacer /> |
| 31 | + <MudStack Class="mb-12" AlignItems="AlignItems.Center" Justify="Justify.Center"> |
15 | 32 | <div class="d-flex justify-center"> |
16 | 33 | <div class="brand">Try<span class="pt-4 pb-12">MudBlazor</span></div> |
17 | 34 | </div> |
| 35 | + <MudTooltip Text="Cleanup and Clear Compiler Cache" Delay="800" Arrow Placement="Placement.Right" Color="Color.Dark"> |
| 36 | + <MudIconButton OnClick="@ClearCache" Icon="@Icons.Material.Filled.CleanHands" Color="@(LayoutService.IsDarkMode ? Color.Info : Color.Inherit)" /> |
| 37 | + </MudTooltip> |
| 38 | + </MudStack> |
18 | 39 | </MudDrawer> |
19 | 40 | <div class="try-editor"> |
20 | 41 | <MudOverlay Visible="Loading" Absolute="true" DarkBackground="true"> |
|
26 | 47 | <ErrorList @bind-Show="@ShowDiagnostics" Diagnostics="@Diagnostics" /> |
27 | 48 | </div> |
28 | 49 | <div id="user-page-window-container"> |
29 | | - <iframe id="user-page-window" src="/user-page"></iframe> |
| 50 | + <iframe id="user-page-window" src="/user-page" style="height: 98vh;"></iframe> |
30 | 51 | </div> |
31 | 52 | </div> |
32 | | - <MudAppBar Bottom="true" Fixed="false" Color="@GetBottomAppBarColor()" Elevation="0" Class="try-errorlist repl-navbar"> |
| 53 | + <MudAppBar Bottom="true" Fixed="true" Color="@GetBottomAppBarColor()" Elevation="0" Class="try-errorlist repl-navbar"> |
33 | 54 | <div class="try-errorlist-button d-flex align-center" @onclick="@ToggleDiagnostics"> |
34 | 55 | <MudIcon Icon="@Icons.Material.Outlined.ErrorOutline" /> |
35 | 56 | <MudText>@ErrorsCount</MudText> |
|
45 | 66 | <MudLink Typo="Typo.body2" Class="ml-5 version-info" Color="Color.Inherit" Href="https://github.com/MudBlazor/MudBlazor/releases" Target="_blank">mudblazor @Version</MudLink> |
46 | 67 | </MudAppBar> |
47 | 68 | </div> |
48 | | -@code{ |
| 69 | +@code { |
49 | 70 |
|
50 | 71 | public Color GetBottomAppBarColor() |
51 | 72 | { |
52 | | - if(ErrorsCount != 0) |
| 73 | + if (ErrorsCount != 0) |
53 | 74 | { |
54 | 75 | return Color.Error; |
55 | 76 | } |
|
0 commit comments