2024-07-28 09:20:00 +00:00
|
|
|
@using AIStudio.Settings.DataModel
|
2024-08-21 06:30:01 +00:00
|
|
|
@using Microsoft.AspNetCore.Components.Routing
|
|
|
|
@using MudBlazor
|
|
|
|
|
2024-07-24 13:17:45 +00:00
|
|
|
@inherits LayoutComponentBase
|
2024-03-28 21:26:48 +00:00
|
|
|
|
2024-04-21 13:22:02 +00:00
|
|
|
<MudPaper Height="calc(100vh);" Elevation="0">
|
|
|
|
<MudLayout>
|
2024-06-30 13:26:28 +00:00
|
|
|
@if (!this.performingUpdate)
|
|
|
|
{
|
2025-01-02 19:26:04 +00:00
|
|
|
@if (this.SettingsManager.ConfigurationData.App.NavigationBehavior is NavBehavior.EXPAND_ON_HOVER or NavBehavior.ALWAYS_EXPAND)
|
|
|
|
{
|
|
|
|
<MudDrawerContainer Class="mud-height-full absolute">
|
|
|
|
<MudDrawer @bind-Open="@this.navBarOpen" MiniWidth="@NAVBAR_COLLAPSED_WIDTH" Width="@NAVBAR_EXPANDED_WIDTH" Elevation="1" Fixed="@true" Variant="@DrawerVariant.Mini" OpenMiniOnHover="@(this.SettingsManager.ConfigurationData.App.NavigationBehavior is NavBehavior.EXPAND_ON_HOVER)" Color="Color.Default">
|
|
|
|
<MudNavMenu>
|
|
|
|
@foreach (var navBarItem in this.navItems)
|
|
|
|
{
|
2025-04-24 11:50:14 +00:00
|
|
|
<MudNavLink Href="@navBarItem.Path" Match="@(navBarItem.MatchAll ? NavLinkMatch.All : NavLinkMatch.Prefix)" Icon="@navBarItem.Icon" Style="@navBarItem.SetColorStyle(this.SettingsManager)" Class="custom-icon-color">
|
|
|
|
@navBarItem.Name
|
|
|
|
</MudNavLink>
|
2025-01-02 19:26:04 +00:00
|
|
|
}
|
|
|
|
</MudNavMenu>
|
|
|
|
</MudDrawer>
|
|
|
|
</MudDrawerContainer>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<MudPaper Width="4em" Class="mud-height-full absolute">
|
2024-06-30 13:26:28 +00:00
|
|
|
<MudNavMenu>
|
2024-09-15 10:30:07 +00:00
|
|
|
@foreach (var navBarItem in this.navItems)
|
2024-07-24 13:17:45 +00:00
|
|
|
{
|
2024-08-05 19:12:52 +00:00
|
|
|
if (this.SettingsManager.ConfigurationData.App.NavigationBehavior is NavBehavior.NEVER_EXPAND_USE_TOOLTIPS)
|
2024-07-24 13:17:45 +00:00
|
|
|
{
|
|
|
|
<MudTooltip Text="@navBarItem.Name" Placement="Placement.Right">
|
2025-01-02 19:26:04 +00:00
|
|
|
<MudNavLink Href="@navBarItem.Path" Match="@(navBarItem.MatchAll ? NavLinkMatch.All : NavLinkMatch.Prefix)" Icon="@navBarItem.Icon" Style="@navBarItem.SetColorStyle(this.SettingsManager)" Class="custom-icon-color"/>
|
2024-07-24 13:17:45 +00:00
|
|
|
</MudTooltip>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2025-01-02 19:26:04 +00:00
|
|
|
<MudNavLink Href="@navBarItem.Path" Match="@(navBarItem.MatchAll ? NavLinkMatch.All : NavLinkMatch.Prefix)" Icon="@navBarItem.Icon" Style="@navBarItem.SetColorStyle(this.SettingsManager)" Class="custom-icon-color"/>
|
2024-07-24 13:17:45 +00:00
|
|
|
}
|
|
|
|
}
|
2024-06-30 13:26:28 +00:00
|
|
|
</MudNavMenu>
|
2025-01-02 19:26:04 +00:00
|
|
|
</MudPaper>
|
|
|
|
}
|
2024-06-30 13:26:28 +00:00
|
|
|
}
|
2024-03-28 21:26:48 +00:00
|
|
|
|
2024-07-24 13:17:45 +00:00
|
|
|
<MudMainContent Class="mud-height-full pt-1" Style="@this.PaddingLeft">
|
2024-11-02 10:12:54 +00:00
|
|
|
<MudContainer MaxWidth="MaxWidth.ExtraExtraLarge" Class="mud-height-full" Style="margin-left: 5em; width: calc(100% - 5em);">
|
2024-06-30 13:26:28 +00:00
|
|
|
@if (!this.performingUpdate)
|
|
|
|
{
|
2025-04-04 21:06:42 +00:00
|
|
|
@this.Body
|
2024-06-30 13:26:28 +00:00
|
|
|
}
|
2025-04-04 21:06:42 +00:00
|
|
|
|
2024-06-30 13:26:28 +00:00
|
|
|
<MudOverlay Visible="@this.performingUpdate" DarkBackground="@true" LockScroll="@true">
|
2025-04-24 11:50:14 +00:00
|
|
|
<MudText Typo="Typo.h3">@T("Please wait for the update to complete...")</MudText>
|
2024-06-30 13:26:28 +00:00
|
|
|
<MudProgressLinear Color="Color.Primary" Indeterminate="@true" Size="Size.Large" Rounded="@true"/>
|
|
|
|
</MudOverlay>
|
2024-04-21 13:22:02 +00:00
|
|
|
</MudContainer>
|
|
|
|
</MudMainContent>
|
|
|
|
</MudLayout>
|
2024-09-15 10:30:07 +00:00
|
|
|
</MudPaper>
|
|
|
|
|
|
|
|
<MudThemeProvider @ref="@this.themeProvider" Theme="@this.ColorTheme" IsDarkMode="@this.useDarkMode" />
|