next-gen-gui: Add button to restore default theme (#7433)

This adds a button in the top right that changes the config back to the
default theme.

Code wise, it takes the header that was previously a part of the
dashboard component and moves it to the app component, and then adds the
button there. Possibly the header should be a component of it's own, but
that's more of refactor that can happen separately I think.

The config change uses the new config API to just patch the relevant
setting.

I'm not doing an automatic reload because 1) I don't want to figure out
how to do it correctly and 2) this doesn't work reliably anyway, as
for example the current gen GUI does a reload and ends up with
connection refused as the API service is still reloading...
This commit is contained in:
Jakob Borg
2021-03-08 12:54:08 +01:00
committed by GitHub
parent c00520281b
commit 22e44642a0
6 changed files with 34 additions and 14 deletions
@@ -1,12 +1,7 @@
<!--<div class="grid-container" gdAreas="header header | folders devices | status-list status-list | footer footer"
gdGap="16px" gdRows="auto auto auto"> -->
<!--<div class="grid-container" fxLayout="row" fxLayoutGap="16px grid" fxLayoutAlign="stretch">-->
<div class="header" fxLayout="row" fxLayoutAlign="space-between center">
<div fxLayout="row" fxLayoutGap="16px" fxLayoutAlign="start center">
<img src="assets/logo-horizontal.svg" width="150px" />
<span>Tech UI</span>
</div>
</div>
<div class="progress">
<mat-progress-bar mode="determinate" value="{{progressValue}}" [@progressBar]="isLoading ? 'start' : 'done'">
</mat-progress-bar>
@@ -1,8 +1,3 @@
.header {
margin: 15px 3vw 12px 3vw;
font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
}
.progress {
margin: 0 3vw 0 3vw;
}