Skip to content

Commit

Permalink
update to mudblazor 7.x
Browse files Browse the repository at this point in the history
  • Loading branch information
mhwlng committed Sep 21, 2024
1 parent f558670 commit d9d0a49
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ chromium-browser --noerrdialogs --disable-infobars --kiosk 'http://127.0.0.1:500

For the 3840x1100 screen, you can increase the zoom level of chromium using --force-device-scale-factor=1.5 on the command line.

If the web page checks for the dark mode system setting, --force-dark-mode can be added to the command line.
If the web page checks for the dark mode system setting, --force-dark-mode --enable-features=WebContentsForceDark can be added to the command line.

To disable the cache mechanism, --disk-cache-dir=/dev/null can be added to the command line.

Expand Down Expand Up @@ -355,7 +355,7 @@ I installed the 'Kiosk Mode' HACS frontend repository. See https://github.com/Ne

Now, you can use the kiosk query parameter, to hide the header and sidebar on the dashboard:

For example : http://192.168.2.34:8123/lovelace/home?kiosk
For example : http://192.168.2.73:8123/lovelace/home?kiosk

Note, that this only works correctly, if you hide the sidebar by default, for the Kiosk user:

Expand Down
2 changes: 1 addition & 1 deletion kiosk-server/Pages/Kiosk.razor
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<MudLayout Class="d-flex flex-grow-1" Style="">
<MudAppBar Elevation="0" Class="pa-0 ma-0 " Color="@(LayoutService.IsDarkMode ? @Color.Dark : @Color.Primary)">
<MudTabs Class="pa-0 ma-0" Elevation="0" Rounded="false" Border="false" DisableRipple="true" DisableSliderAnimation="true" Color="@(LayoutService.IsDarkMode ? @Color.Dark : @Color.Primary)" ActivePanelIndexChanged="ActivePanelIndexChanged" TabHeaderClass="@TabHeaderClass">
<MudTabs Class="pa-0 ma-0" Elevation="0" Rounded="false" Border="false" Ripple="false" SliderAnimation="false" Color="@(LayoutService.IsDarkMode ? @Color.Dark : @Color.Primary)" ActivePanelIndexChanged="ActivePanelIndexChanged" TabHeaderClass="@TabHeaderClass">
@foreach (var url in RedirectUrlList)
{
<MudTabPanel Text="@url.Name"/>
Expand Down
6 changes: 3 additions & 3 deletions kiosk-server/Pages/Setup.razor
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

</ToolBarContent>
<Columns>
<PropertyColumn T="RedirectItem" TProperty="int" Property="x => x.Id" IsEditable="false" HeaderStyle="width:1%" CellStyle="text-align:center;"/>
<PropertyColumn T="RedirectItem" TProperty="int" Property="x => x.Id" Editable="false" HeaderStyle="width:1%" CellStyle="text-align:center;"/>
<PropertyColumn T="RedirectItem" TProperty="string" Property="x => x.Name" HeaderStyle="Width:20%">
<EditTemplate>
<MudTextField T="string" Value="context.Item.Name" ValueChanged="@(async (e) => { context.Item.Name = e;await CommittedItemChanges(context.Item); })" Margin="@Margin.Dense" Style="margin-top:0" />
Expand All @@ -27,11 +27,11 @@
</EditTemplate>
</PropertyColumn>

<TemplateColumn T="RedirectItem" IsEditable="false" Title="Action" HeaderStyle="width:1%" CellStyle="text-align:center;">
<TemplateColumn T="RedirectItem" Editable="false" Title="Action" HeaderStyle="width:1%" CellStyle="text-align:center;">
<CellTemplate>
@if (!string.IsNullOrEmpty(context.Item.Url))
{
<MudIconButton Size="@Size.Small" Icon="@Icons.Material.Outlined.Delete" Title="Delete" OnClick="@(async (e) => { await DeleteUrl(context.Item); })"/>
<MudIconButton Size="@Size.Small" Icon="@Icons.Material.Outlined.Delete" title="Delete" OnClick="@(async (e) => { await DeleteUrl(context.Item); })"/>
}

</CellTemplate>
Expand Down
1 change: 1 addition & 0 deletions kiosk-server/Shared/EmptyLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@inherits LayoutComponentBase

<MudThemeProvider IsDarkMode="@LayoutService.IsDarkMode"/>
<MudPopoverProvider />
<MudDialogProvider />
<MudSnackbarProvider />

Expand Down
10 changes: 5 additions & 5 deletions kiosk-server/kiosk-server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
</Target>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="8.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.Analyzers" Version="8.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="8.0.8" />
<PackageReference Include="Microsoft.AspNetCore.Components.Analyzers" Version="8.0.8" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.8" />
<PackageReference Include="Microsoft.Extensions.Hosting.Systemd" Version="8.0.0" />
<PackageReference Include="Microsoft.JSInterop" Version="8.0.4" />
<PackageReference Include="MudBlazor" Version="6.19.1" />
<PackageReference Include="Microsoft.JSInterop" Version="8.0.8" />
<PackageReference Include="MudBlazor" Version="7.8.0" />
<PackageReference Include="System.IO.Pipelines" Version="8.0.0" />
</ItemGroup>

Expand Down

0 comments on commit d9d0a49

Please sign in to comment.