Skip to content

Commit

Permalink
Update MainLayout.razor
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoCoderMatrix86 committed Apr 10, 2024
1 parent 96a3963 commit d4cc431
Showing 1 changed file with 62 additions and 44 deletions.
106 changes: 62 additions & 44 deletions AudioCuesheetEditor/Shared/MainLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,18 @@ along with Foobar. If not, see
<CascadingValue Value="@this">
<Layout>
<LayoutHeader Fixed Position="Position.Sticky">
<Bar Background="Background.Dark" ThemeContrast="ThemeContrast.Dark">
@if (displayMenuBar)
<Bar Background="Background.Dark" ThemeContrast="ThemeContrast.Dark" Breakpoint="Breakpoint.Tablet">
@if ((displayMenuBar) && (sidebar != null))
{
<BarToggler Bar="sidebar" />
//Just a little a hack for displaying a toggler for the sidebar always and independent from the breakpoint of the top bar
<BarItem Padding="Padding.Is1.OnX">
<Button Color="Color.Secondary" Outline Clicked="() => sidebar.OnBreakpoint(sidebar.Visible)">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-menu-button-wide" viewBox="0 0 16 16">
<path d="M0 1.5A1.5 1.5 0 0 1 1.5 0h13A1.5 1.5 0 0 1 16 1.5v2A1.5 1.5 0 0 1 14.5 5h-13A1.5 1.5 0 0 1 0 3.5zM1.5 1a.5.5 0 0 0-.5.5v2a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-2a.5.5 0 0 0-.5-.5z" />
<path d="M2 2.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5m10.823.323-.396-.396A.25.25 0 0 1 12.604 2h.792a.25.25 0 0 1 .177.427l-.396.396a.25.25 0 0 1-.354 0M0 8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2zm1 3v2a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2zm14-1V8a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1v2zM2 8.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5m0 4a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 0 1h-6a.5.5 0 0 1-.5-.5" />
</svg>
</Button>
</BarItem>
}
<BarBrand>
<BarLink To="@_navigationManager.BaseUri">
Expand All @@ -57,47 +65,56 @@ along with Foobar. If not, see
</Row>
</BarLink>
</BarBrand>
@if (displayMenuBar)
{
<BarItem Padding="Padding.Is1.OnX">
<Tooltip Text="@_localizer["Undo last change"]">
<Button Color="Color.Primary" Disabled="!_traceChangeManager.CanUndo" Clicked="() => _traceChangeManager.Undo()">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-counterclockwise" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M8 3a5 5 0 1 1-4.546 2.914.5.5 0 0 0-.908-.417A6 6 0 1 0 8 2z" />
<path d="M8 4.466V.534a.25.25 0 0 0-.41-.192L5.23 2.308a.25.25 0 0 0 0 .384l2.36 1.966A.25.25 0 0 0 8 4.466" />
</svg>
<Text>
@_localizer["Undo"]
</Text>
</Button>
</Tooltip>
</BarItem>
<BarItem Padding="Padding.Is1.OnX">
<Tooltip Text="@_localizer["Redo last change"]">
<Button Color="Color.Primary" Disabled="!_traceChangeManager.CanRedo" Clicked="() => _traceChangeManager.Redo()">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-clockwise" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2z" />
<path d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466" />
</svg>
<Text>
@_localizer["Redo"]
</Text>
</Button>
</Tooltip>
</BarItem>
}
<BarItem Display="Display.Block.OnFullHD.None.OnDesktop.None.OnTablet.None.OnMobile">
<CultureSelector />
</BarItem>

<BarEnd>
<BarItem>
<BarLink To="help" TextColor="TextColor.White">@_localizer["Help"]</BarLink>
</BarItem>
<BarItem>
<BarLink To="about" TextColor="TextColor.White">@_localizer["About"]</BarLink>
</BarItem>
</BarEnd>
<BarToggler />
<BarMenu>
@if (displayMenuBar)
{
<BarStart>
<BarItem Padding="Padding.Is1.OnX">
<Tooltip Text="@_localizer["Undo last change"]">
<Button Color="Color.Primary" Disabled="!_traceChangeManager.CanUndo" Clicked="() => _traceChangeManager.Undo()">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-counterclockwise" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M8 3a5 5 0 1 1-4.546 2.914.5.5 0 0 0-.908-.417A6 6 0 1 0 8 2z" />
<path d="M8 4.466V.534a.25.25 0 0 0-.41-.192L5.23 2.308a.25.25 0 0 0 0 .384l2.36 1.966A.25.25 0 0 0 8 4.466" />
</svg>
<Text>
@_localizer["Undo"]
</Text>
</Button>
</Tooltip>
</BarItem>
<BarItem Padding="Padding.Is1.OnX">
<Tooltip Text="@_localizer["Redo last change"]">
<Button Color="Color.Primary" Disabled="!_traceChangeManager.CanRedo" Clicked="() => _traceChangeManager.Redo()">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-clockwise" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2z" />
<path d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466" />
</svg>
<Text>
@_localizer["Redo"]
</Text>
</Button>
</Tooltip>
</BarItem>
</BarStart>
}
<BarEnd>
<BarItem Padding="Padding.Is1.OnX">
<BarDropdown RightAligned>
<BarDropdownToggle>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-question-circle" viewBox="0 0 16 16">
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16" />
<path d="M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286m1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94" />
</svg>
</BarDropdownToggle>
<BarDropdownMenu Background="Background.Dark">
<BarDropdownItem To="help" TextColor="TextColor.White">@_localizer["Help"]</BarDropdownItem>
<BarDropdownItem To="about" TextColor="TextColor.White">@_localizer["About"]</BarDropdownItem>
</BarDropdownMenu>
</BarDropdown>
</BarItem>
</BarEnd>
</BarMenu>
</Bar>
</LayoutHeader>
<Layout Sider="displayMenuBar">
Expand Down Expand Up @@ -412,6 +429,7 @@ along with Foobar. If not, see
@code {
//TODO: Top Menu
//TODO: Make text of undo/redo display only when space is available
//TODO: Language selection in top menu
Bar? sidebar;

public class SelectExportProfileModel
Expand Down

0 comments on commit d4cc431

Please sign in to comment.