Skip to content

Commit

Permalink
Expand NavMenu.resx
Browse files Browse the repository at this point in the history
Add MainLayout.resx
  • Loading branch information
kallievz committed Jan 9, 2025
1 parent 2d36de4 commit c74d6be
Show file tree
Hide file tree
Showing 12 changed files with 526 additions and 45 deletions.
57 changes: 23 additions & 34 deletions src/apps/blazor/client/Layout/MainLayout.razor
Original file line number Diff line number Diff line change
@@ -1,64 +1,53 @@
<MudAppBar Color="Color.Surface" Elevation="0">
<MudTooltip Text="Toggle Drawer">
@inject Microsoft.Extensions.Localization.IStringLocalizer<MainLayout> _localizer
<MudAppBar Color="Color.Surface" Elevation="0">
<MudTooltip Text="@_localizer["Toggle Drawer"]">
<MudIconButton Icon="@Icons.Material.Rounded.Notes" Color="Color.Inherit" Edge="Edge.Start"
OnClick="@((e) => DrawerToggle())" />
</MudTooltip>
<MudButton Variant="Variant.Text" Color="Color.Transparent" Href="/" DropShadow="false">
fullstackhero
</MudButton>
<MudButton Variant="Variant.Text" Color="Color.Transparent" Href="/" DropShadow="false">fullstackhero</MudButton>
<MudSpacer />
<MudHidden Breakpoint="Breakpoint.MdAndUp" Invert="true">
<LanguageSelector />
<MudButton Variant="Variant.Filled" DropShadow="false" Color="Color.Primary"
Href="https://opencollective.com/fullstackhero" Target="_blank" StartIcon="@Icons.Material.Filled.Favorite">
Sponsor</MudButton>
@_localizer["Sponsor"]
</MudButton>
<MudToggleIconButton @bind-Toggled="@_isDarkMode" Icon="@Icons.Material.Filled.WbSunny"
Color="@Color.Warning" title="off" Class="d-flex ml-auto" ToggledIcon="@Icons.Material.Filled.DarkMode"
ToggledColor="@Color.Surface" toggledTitle="on" style="left:8px!important" @onclick="@ToggleDarkMode" />
<MudTooltip Text="Support">
<MudTooltip Text="@_localizer["Support"]">
<MudMenu Icon="@Icons.Material.Filled.SupportAgent" Color="Color.Inherit" Dense="true" AnchorOrigin="Origin.CenterRight">
<MudText Typo="Typo.body2" Class="px-4 py-2"><b>Community</b></MudText>
<MudText Typo="Typo.body2" Class="px-4 py-2"><b>@_localizer["Community"]</b></MudText>
<MudMenuItem Href="https://discord.gg/yQWpShsKrf" Target="_blank">Discord</MudMenuItem>
<MudMenuItem Href="https://www.facebook.com/codewithmukesh" Target="_blank">Facebook
</MudMenuItem>
<MudMenuItem Href="https://www.facebook.com/codewithmukesh" Target="_blank">Facebook</MudMenuItem>
<MudMenuItem Href="https://www.linkedin.com/in/iammukeshm/" Target="_blank">LinkedIn</MudMenuItem>
<MudMenuItem Href="https://www.buymeacoffee.com/codewithmukesh" Target="_blank">Buy Me a Coffee!
</MudMenuItem>
<MudMenuItem Href="https://opencollective.com/fullstackhero" Target="_blank">Open Collective
</MudMenuItem>
<MudMenuItem Href="https://www.buymeacoffee.com/codewithmukesh" Target="_blank">Buy Me a Coffee!</MudMenuItem>
<MudMenuItem Href="https://opencollective.com/fullstackhero" Target="_blank">Open Collective</MudMenuItem>
<MudText Typo="Typo.body2" Class="px-4 py-2"><b>Resources</b></MudText>
<MudMenuItem Href="https://fullstackhero.net/" Target="_blank">Documentation
</MudMenuItem>
<MudMenuItem Href="https://fullstackhero.net/" Target="_blank">FSH Documentation</MudMenuItem>
</MudMenu>
</MudTooltip>
<MudTooltip Text="Fork Repository">
<MudIconButton Icon="@Icons.Custom.Brands.GitHub" Color="Color.Inherit"
Href="https://github.com/fullstackhero/dotnet-starter-kit" Target="_blank" />
<MudIconButton Icon="@Icons.Custom.Brands.GitHub" Color="Color.Inherit" Href="https://github.com/fullstackhero/dotnet-starter-kit" Target="_blank" />
</MudTooltip>
</MudHidden>
<MudHidden Breakpoint="Breakpoint.SmAndDown" Invert="true">

<MudTooltip Text="Sponsor">
<MudIconButton Icon="@Icons.Material.Filled.Favorite" Color="Color.Inherit"
Href="https://opencollective.com/fullstackhero" Target="_blank" />
<MudTooltip Text="@_localizer["Sponsor"]">
<MudIconButton Icon="@Icons.Material.Filled.Favorite" Color="Color.Inherit" Href="https://opencollective.com/fullstackhero" Target="_blank" />
</MudTooltip>
<MudMenu Icon="@Icons.Material.Filled.Settings" Color="Color.Inherit" Dense="true" AnchorOrigin="Origin.CenterRight">
<div class="px-2">
<MudIconButton Icon="@Icons.Custom.Brands.GitHub" Color="Color.Inherit"
Href="https://github.com/fullstackhero/blazor-wasm-boilerplate" Target="_blank" />
<MudIconButton Icon="@Icons.Material.Filled.Coffee" Color="Color.Inherit"
Href="https://www.buymeacoffee.com/codewithmukesh" Target="_blank" />
<MudIconButton Icon="@Icons.Custom.Brands.GitHub" Color="Color.Inherit" Href="https://github.com/fullstackhero/blazor-wasm-boilerplate" Target="_blank" />
<MudIconButton Icon="@Icons.Material.Filled.Coffee" Color="Color.Inherit" Href="https://www.buymeacoffee.com/codewithmukesh" Target="_blank" />
</div>
<MudText Typo="Typo.body2" Class="px-4 py-2"><b>Community</b></MudText>
<MudText Typo="Typo.body2" Class="px-4 py-2"><b>@_localizer["Community"]</b></MudText>
<MudMenuItem Href="https://discord.gg/yQWpShsKrf" Target="_blank">Discord</MudMenuItem>
<MudMenuItem Href="https://www.facebook.com/codewithmukesh" Target="_blank">Facebook
</MudMenuItem>
<MudMenuItem Href="https://www.facebook.com/codewithmukesh" Target="_blank">Facebook</MudMenuItem>
<MudMenuItem Href="https://www.Hrefedin.com/in/iammukeshm/" Target="_blank">HrefedIn</MudMenuItem>
<MudText Typo="Typo.body2" Class="px-4 py-2"><b>Resources</b></MudText>
<MudMenuItem Href="https://mudblazor.com/getting-started/installation" Target="_blank">
MudBlazor Documentation</MudMenuItem>
<MudMenuItem Href="https://fullstackhero.net/getting-started/" Target="_blank">
Quick-Start Guide</MudMenuItem>
<MudMenuItem Href="https://mudblazor.com/getting-started/installation" Target="_blank">MudBlazor Documentation</MudMenuItem>
<MudMenuItem Href="https://fullstackhero.net/getting-started/" Target="_blank">Quick-Start Guide</MudMenuItem>
</MudMenu>
</MudHidden>
<MudMenu DropShadow="false" PopoverClass="mud-elevation-25" AnchorOrigin="Origin.BottomRight" LockScroll="true" TransformOrigin="Origin.TopRight">
Expand All @@ -70,7 +59,7 @@
<MudMenuItem OnClick="Profile">
<div class="d-flex">
<MudIcon Class="mx-2" Icon="@Icons.Material.Filled.Person" />
<MudText>Account</MudText>
<MudText>@_localizer["Account"]</MudText>
</div>
</MudMenuItem>
<MudMenuItem Href="/dashboard">
Expand All @@ -82,7 +71,7 @@
<div class="mt-4 mx-4">
<MudButton Color="Color.Error" FullWidth="true" StartIcon="@Icons.Material.Filled.Logout" DropShadow="false"
Variant="Variant.Filled" OnClick="Logout">
Logout
@_localizer["Logout"]
</MudButton>
</div>
</div>
Expand Down
14 changes: 7 additions & 7 deletions src/apps/blazor/client/Layout/NavMenu.razor
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@
}
<MudText Typo="Typo.subtitle2" Color="Color.Surface" Class="ml-4 my-3">@_localizer["Modules"]</MudText>
<MudNavGroup Title="@_localizer["Catalog"]" Icon="@Icons.Material.Filled.AddBox">
<MudNavLink Href="/catalog/products" Icon="@Icons.Material.Filled.ShoppingBag" Class="fsh-nav-child">Products</MudNavLink>
<MudNavLink Href="/catalog/brands" Icon="@Icons.Material.Filled.Label" Class="fsh-nav-child">Brands</MudNavLink>
<MudNavLink Href="/catalog/products" Icon="@Icons.Material.Filled.ShoppingBag" Class="fsh-nav-child">@_localizer["Products"]</MudNavLink>
<MudNavLink Href="/catalog/brands" Icon="@Icons.Material.Filled.Label" Class="fsh-nav-child">@_localizer["Brands"]</MudNavLink>
</MudNavGroup>
<MudNavLink Href="/todos" Icon="@Icons.Material.Filled.Checklist" Class="fsh-nav-child">Todos</MudNavLink>
<MudNavLink Href="/todos" Icon="@Icons.Material.Filled.Checklist" Class="fsh-nav-child">@_localizer["Todos"]</MudNavLink>
@if (CanViewAdministrationGroup)
{
<MudText Typo="Typo.subtitle2" Color="Color.Surface" Class="ml-4 my-3">Administration</MudText>
<MudText Typo="Typo.subtitle2" Color="Color.Surface" Class="ml-4 my-3">@_localizer["Administration"]</MudText>
@if (_canViewUsers)
{
<MudNavLink Match="NavLinkMatch.Prefix" Href="/identity/users" Icon="@Icons.Material.Filled.PeopleAlt">Users</MudNavLink>
<MudNavLink Match="NavLinkMatch.Prefix" Href="/identity/users" Icon="@Icons.Material.Filled.PeopleAlt">@_localizer["Users"]</MudNavLink>
}
@if (_canViewRoles)
{
<MudNavLink Href="/identity/roles" Icon="@Icons.Material.Filled.EmojiPeople">Roles</MudNavLink>
<MudNavLink Href="/identity/roles" Icon="@Icons.Material.Filled.EmojiPeople">@_localizer["Roles"]</MudNavLink>
}
@if (_canViewTenants)
{
<MudNavLink Href="/tenants" Icon="@Icons.Material.Filled.GroupWork" Disabled="!_canViewTenants">Tenants</MudNavLink>
<MudNavLink Href="/tenants" Icon="@Icons.Material.Filled.GroupWork" Disabled="!_canViewTenants">@_localizer["Tenants"]</MudNavLink>
}
}
</MudNavMenu>
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,7 @@
<data name="Save" xml:space="preserve">
<value>Stoor</value>
</data>
<data name="Update" xml:space="preserve">
<value>Bywerking</value>
</data>
</root>
138 changes: 138 additions & 0 deletions src/apps/blazor/client/Resources/Layout/MainLayout.af.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Account" xml:space="preserve">
<value>Rekening</value>
</data>
<data name="Community" xml:space="preserve">
<value>Gemeenskap</value>
</data>
<data name="Logout" xml:space="preserve">
<value>Meld af</value>
</data>
<data name="Sponsor" xml:space="preserve">
<value>Borg</value>
</data>
<data name="Support" xml:space="preserve">
<value>Ondersteuning</value>
</data>
<data name="Toggle Drawer" xml:space="preserve">
<value>Wissel laai</value>
</data>
</root>
Loading

0 comments on commit c74d6be

Please sign in to comment.