From 2208ff1ca3702b0cc4d5cfbcdad46a4889db91a8 Mon Sep 17 00:00:00 2001 From: Christoph Hofmann Date: Tue, 20 Jul 2021 21:27:51 +0200 Subject: [PATCH] Minor UI improvements #201 #131 Signed-off-by: Christoph Hofmann --- src/openHAB.Core/Strings/de-de/Resources.resw | 2 +- src/openHAB.Core/Strings/en-us/Resources.resw | 2 +- .../Controls/ConnectionDialog.xaml | 6 +- src/openHAB.Windows/Styles/DefaultTheme.xaml | 6 +- src/openHAB.Windows/View/LogViewerPage.xaml | 14 +- src/openHAB.Windows/View/MainPage.xaml | 23 +- src/openHAB.Windows/View/SettingsPage.xaml | 521 +++++++++--------- .../ViewModel/LogsViewModel.cs | 15 + 8 files changed, 306 insertions(+), 283 deletions(-) diff --git a/src/openHAB.Core/Strings/de-de/Resources.resw b/src/openHAB.Core/Strings/de-de/Resources.resw index e25e2f7b..e51f46df 100644 --- a/src/openHAB.Core/Strings/de-de/Resources.resw +++ b/src/openHAB.Core/Strings/de-de/Resources.resw @@ -252,7 +252,7 @@ Bitte wählen Sie den Demo Modus oder die Lokalen/Remote Verbindunsinformation z Zurück - Log + Log: App Einstellungen diff --git a/src/openHAB.Core/Strings/en-us/Resources.resw b/src/openHAB.Core/Strings/en-us/Resources.resw index 8ae09297..670fc53d 100644 --- a/src/openHAB.Core/Strings/en-us/Resources.resw +++ b/src/openHAB.Core/Strings/en-us/Resources.resw @@ -256,7 +256,7 @@ Please select demo mode or configure local/remote connection. Back - Log + Log: App Settings diff --git a/src/openHAB.Windows/Controls/ConnectionDialog.xaml b/src/openHAB.Windows/Controls/ConnectionDialog.xaml index 237cc055..a7edfca7 100644 --- a/src/openHAB.Windows/Controls/ConnectionDialog.xaml +++ b/src/openHAB.Windows/Controls/ConnectionDialog.xaml @@ -9,7 +9,7 @@ xmlns:Core="using:Microsoft.Xaml.Interactions.Core" xmlns:converters="using:OpenHAB.Windows.Converters" mc:Ignorable="d" - Background="{StaticResource OpenHABLightColor}"> + Background="{StaticResource OpenHABLightColor}"> @@ -84,14 +84,14 @@ IsChecked="{Binding WillIgnoreSSLHostname, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> + Background="{StaticResource OpenHABLightColor}"> - + - + - + - + + + + - + Color="{StaticResource DarkColor}" />--> + + + + - diff --git a/src/openHAB.Windows/View/SettingsPage.xaml b/src/openHAB.Windows/View/SettingsPage.xaml index 0f34b914..9e66a60b 100644 --- a/src/openHAB.Windows/View/SettingsPage.xaml +++ b/src/openHAB.Windows/View/SettingsPage.xaml @@ -1,266 +1,259 @@  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:converters="using:OpenHAB.Windows.Converters" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:core="using:Microsoft.Xaml.Interactions.Core" + xmlns:interactivity="using:Microsoft.Xaml.Interactivity" + xmlns:muxc="using:Microsoft.UI.Xaml.Controls" + mc:Ignorable="d" + x:Name="SettingsView"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/openHAB.Windows/ViewModel/LogsViewModel.cs b/src/openHAB.Windows/ViewModel/LogsViewModel.cs index cf8e3285..62fb4749 100644 --- a/src/openHAB.Windows/ViewModel/LogsViewModel.cs +++ b/src/openHAB.Windows/ViewModel/LogsViewModel.cs @@ -63,6 +63,21 @@ public string LogFilePath } } + /// Gets the log file name including extension. + /// The log file. + public string LogFile + { + get + { + if (_logFile != null) + { + return _logFile.Name; + } + + return string.Empty; + } + } + private async Task LoadLogfileAsync() { await LoadLogFileContent().ConfigureAwait(false);