Improved the navbar handling when configured as "never expands" (#243)

This commit is contained in:
Thorsten Sommer 2025-01-02 20:26:04 +01:00 committed by GitHub
parent 3b93841982
commit 0acb3a20a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 28 additions and 8 deletions

View File

@ -7,26 +7,40 @@
<MudPaper Height="calc(100vh);" Elevation="0"> <MudPaper Height="calc(100vh);" Elevation="0">
<MudLayout> <MudLayout>
@if (!this.performingUpdate) @if (!this.performingUpdate)
{
@if (this.SettingsManager.ConfigurationData.App.NavigationBehavior is NavBehavior.EXPAND_ON_HOVER or NavBehavior.ALWAYS_EXPAND)
{ {
<MudDrawerContainer Class="mud-height-full absolute"> <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"> <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)
{
<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>
}
</MudNavMenu>
</MudDrawer>
</MudDrawerContainer>
}
else
{
<MudPaper Width="4em" Class="mud-height-full absolute">
<MudNavMenu> <MudNavMenu>
@foreach (var navBarItem in this.navItems) @foreach (var navBarItem in this.navItems)
{ {
if (this.SettingsManager.ConfigurationData.App.NavigationBehavior is NavBehavior.NEVER_EXPAND_USE_TOOLTIPS) if (this.SettingsManager.ConfigurationData.App.NavigationBehavior is NavBehavior.NEVER_EXPAND_USE_TOOLTIPS)
{ {
<MudTooltip Text="@navBarItem.Name" Placement="Placement.Right"> <MudTooltip Text="@navBarItem.Name" Placement="Placement.Right">
<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> <MudNavLink Href="@navBarItem.Path" Match="@(navBarItem.MatchAll ? NavLinkMatch.All : NavLinkMatch.Prefix)" Icon="@navBarItem.Icon" Style="@navBarItem.SetColorStyle(this.SettingsManager)" Class="custom-icon-color"/>
</MudTooltip> </MudTooltip>
} }
else else
{ {
<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> <MudNavLink Href="@navBarItem.Path" Match="@(navBarItem.MatchAll ? NavLinkMatch.All : NavLinkMatch.Prefix)" Icon="@navBarItem.Icon" Style="@navBarItem.SetColorStyle(this.SettingsManager)" Class="custom-icon-color"/>
} }
} }
</MudNavMenu> </MudNavMenu>
</MudDrawer> </MudPaper>
</MudDrawerContainer> }
} }
<MudMainContent Class="mud-height-full pt-1" Style="@this.PaddingLeft"> <MudMainContent Class="mud-height-full pt-1" Style="@this.PaddingLeft">

View File

@ -70,3 +70,8 @@
text-decoration-color: red; text-decoration-color: red;
text-decoration-thickness: 2px; text-decoration-thickness: 2px;
} }
/* Fixed for MudBlazor, tooltips inside of navmenu */
.mud-navmenu .mud-tooltip-root {
display: initial !important;
}

View File

@ -7,6 +7,7 @@
- Improved the creation of the "the bias of the day" workspace; create that workspace only when the bias of the day feature is used. - Improved the creation of the "the bias of the day" workspace; create that workspace only when the bias of the day feature is used.
- Improved the save operation of settings by using a temporary file to avoid data loss in rare cases. - Improved the save operation of settings by using a temporary file to avoid data loss in rare cases.
- Improved the system prompt handling: Injection of profiles into system prompts happens right before sending the data. This way, the original system prompts are not modified. - Improved the system prompt handling: Injection of profiles into system prompts happens right before sending the data. This way, the original system prompts are not modified.
- Improved the navigation bar handling when configured as "never expands" with or without tooltips.
- Fixed OpenAI `o` (aka omni, aka reasoning) models. The early preview versions (released before 17th December 2024) could not use any system prompts —- we translated the system prompts to be user prompts. Final versions of the OpenAI `o` models can now use system prompts, by they are named `developer` instead of `system`. - Fixed OpenAI `o` (aka omni, aka reasoning) models. The early preview versions (released before 17th December 2024) could not use any system prompts —- we translated the system prompts to be user prompts. Final versions of the OpenAI `o` models can now use system prompts, by they are named `developer` instead of `system`.
- Fixed layout issues when selecting `other` items (e.g., programming languages). - Fixed layout issues when selecting `other` items (e.g., programming languages).
- Fixed a bug about the bias of the day workspace when the workspace component was hidden. - Fixed a bug about the bias of the day workspace when the workspace component was hidden.