Skip to content

Commit

Permalink
show reload button after connection to server is lost
Browse files Browse the repository at this point in the history
add power off button to kiosk tab bar
  • Loading branch information
mhwlng committed Dec 26, 2022
1 parent 77a152e commit 717ca29
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
3 changes: 3 additions & 0 deletions kiosk-server/Pages/Kiosk.razor
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<MudTabPanel Text="@url.Name"/>
}
</MudTabs>
<MudSpacer />
<MudIconButton Icon="@(LayoutService.IsDarkMode ? @Icons.Rounded.PowerSettingsNew : @Icons.Material.Outlined.PowerSettingsNew)" Color="Color.Inherit" OnClick="@HandleShutdown" />

</MudAppBar>
<MudMainContent Class="d-flex flex-column">
<MudPaper Class="pa-0 ma-0 flex-grow-1 flex-shrink-1" Square="true" Elevation="0" Style="overflow:hidden">
Expand Down
5 changes: 4 additions & 1 deletion kiosk-server/Pages/Kiosk.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ private void ActivePanelIndexChanged(int index)
StateHasChanged();
}


private static void HandleShutdown()
{
System.Diagnostics.Process.Start(new ProcessStartInfo() { FileName = "sudo", Arguments = "shutdown now" });
}

}
}
13 changes: 12 additions & 1 deletion kiosk-server/Pages/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,18 @@
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
<link href="css/site.css" rel="stylesheet" />
<link href="kiosk-server.styles.css" rel="stylesheet" />

<style>
#components-reconnect-modal
{
color: black;
}
#components-reconnect-modal a
{
color: black;
font-weight: bold;
text-decoration:underline
}
</style>
@*<script src="appscript://dynamic.js"></script>*@

<component type="typeof(HeadOutlet)" render-mode="Server" />
Expand Down
6 changes: 3 additions & 3 deletions kiosk-server/kiosk-server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
<PreBuildEvent>
</PreBuildEvent>
<ApplicationIcon>wwwroot\favicon.ico</ApplicationIcon>
<Version>0.0.0.9</Version>
<Version>0.0.1.0</Version>
<Copyright>Copyright © 2022</Copyright>
<Company />
<Authors />
<AssemblyVersion>0.0.0.9</AssemblyVersion>
<FileVersion>0.0.0.9</FileVersion>
<AssemblyVersion>0.0.1.0</AssemblyVersion>
<FileVersion>0.0.1.0</FileVersion>
</PropertyGroup>

<Target Name="PiCopy" AfterTargets="AfterPublish">
Expand Down

0 comments on commit 717ca29

Please sign in to comment.