From d779ed9bc8535e44f83ee58e7e1e7545b56bbb5c Mon Sep 17 00:00:00 2001 From: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com> Date: Mon, 29 May 2023 19:01:49 +0300 Subject: [PATCH] Blur the token in GUI when the control is out of focus --- .../Components/DashboardViewModel.cs | 2 ++ .../Views/Components/DashboardView.xaml | 23 ++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/DiscordChatExporter.Gui/ViewModels/Components/DashboardViewModel.cs b/DiscordChatExporter.Gui/ViewModels/Components/DashboardViewModel.cs index 1d8b36a..f7d317b 100644 --- a/DiscordChatExporter.Gui/ViewModels/Components/DashboardViewModel.cs +++ b/DiscordChatExporter.Gui/ViewModels/Components/DashboardViewModel.cs @@ -38,6 +38,8 @@ public class DashboardViewModel : PropertyChangedBase public string? Token { get; set; } + public bool IsTokenSet => !string.IsNullOrWhiteSpace(Token); + private IReadOnlyDictionary>? ChannelsByGuild { get; set; } public IReadOnlyList? AvailableGuilds => ChannelsByGuild?.Keys.ToArray(); diff --git a/DiscordChatExporter.Gui/Views/Components/DashboardView.xaml b/DiscordChatExporter.Gui/Views/Components/DashboardView.xaml index 497c373..b442923 100644 --- a/DiscordChatExporter.Gui/Views/Components/DashboardView.xaml +++ b/DiscordChatExporter.Gui/Views/Components/DashboardView.xaml @@ -85,7 +85,28 @@ materialDesign:TextFieldAssist.TextBoxViewMargin="0,0,2,0" BorderThickness="0" FontSize="16" - Text="{Binding Token, UpdateSourceTrigger=PropertyChanged}" /> + Text="{Binding Token, UpdateSourceTrigger=PropertyChanged}"> + + + +