From ac4061f1ca2fdfd403f702df189bd7ac2790d30b Mon Sep 17 00:00:00 2001 From: whimsical-c4lic0 Date: Wed, 18 Feb 2026 01:48:28 -0600 Subject: [PATCH] UI improvements --- OF DL.Gui/App.axaml | 131 +- .../ViewModels/ConfigCategoryViewModel.cs | 34 +- OF DL.Gui/ViewModels/MainWindowViewModel.cs | 15 +- OF DL.Gui/Views/AboutWindow.axaml | 213 ++- OF DL.Gui/Views/FaqWindow.axaml | 203 ++- OF DL.Gui/Views/MainWindow.axaml | 1495 ++++++++++------- OF DL.Gui/Views/MainWindow.axaml.cs | 10 +- 7 files changed, 1241 insertions(+), 860 deletions(-) diff --git a/OF DL.Gui/App.axaml b/OF DL.Gui/App.axaml index 6f7b6ff..ed5d389 100644 --- a/OF DL.Gui/App.axaml +++ b/OF DL.Gui/App.axaml @@ -4,30 +4,113 @@ RequestedThemeVariant="Light" x:Class="OF_DL.Gui.App"> - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OF DL.Gui/ViewModels/ConfigCategoryViewModel.cs b/OF DL.Gui/ViewModels/ConfigCategoryViewModel.cs index 2b20cdc..030f458 100644 --- a/OF DL.Gui/ViewModels/ConfigCategoryViewModel.cs +++ b/OF DL.Gui/ViewModels/ConfigCategoryViewModel.cs @@ -33,20 +33,23 @@ public sealed class ConfigCategoryViewModel : ViewModelBase FolderPerMessageField = fieldList.FirstOrDefault(field => string.Equals(field.PropertyName, nameof(Config.FolderPerMessage), StringComparison.Ordinal)); - IEnumerable visibleFields = IsDownloadBehavior - ? fieldList.Where(field => field.PropertyName is not nameof(Config.DownloadOnlySpecificDates) - and not nameof(Config.DownloadDateSelection) - and not nameof(Config.CustomDate) - and not nameof(Config.DownloadVideoResolution)) - : IsPerformance - ? fieldList.Where(field => field.PropertyName is not nameof(Config.LimitDownloadRate) - and not nameof(Config.DownloadLimitInMbPerSec)) - : IsFolderStructure - ? fieldList.Where(field => field.PropertyName is not nameof(Config.FolderPerPaidPost) - and not nameof(Config.FolderPerPost) - and not nameof(Config.FolderPerPaidMessage) - and not nameof(Config.FolderPerMessage)) - : fieldList; + IEnumerable visibleFields = IsExternal + ? fieldList.Where(field => field.PropertyName is not nameof(Config.FFmpegPath) + and not nameof(Config.FFprobePath)) + : IsDownloadBehavior + ? fieldList.Where(field => field.PropertyName is not nameof(Config.DownloadOnlySpecificDates) + and not nameof(Config.DownloadDateSelection) + and not nameof(Config.CustomDate) + and not nameof(Config.DownloadVideoResolution)) + : IsPerformance + ? fieldList.Where(field => field.PropertyName is not nameof(Config.LimitDownloadRate) + and not nameof(Config.DownloadLimitInMbPerSec)) + : IsFolderStructure + ? fieldList.Where(field => field.PropertyName is not nameof(Config.FolderPerPaidPost) + and not nameof(Config.FolderPerPost) + and not nameof(Config.FolderPerPaidMessage) + and not nameof(Config.FolderPerMessage)) + : fieldList; foreach (ConfigFieldViewModel field in visibleFields) { @@ -56,6 +59,9 @@ public sealed class ConfigCategoryViewModel : ViewModelBase public string CategoryName { get; } + public bool IsExternal => + string.Equals(CategoryName, "External", StringComparison.Ordinal); + public bool IsDownloadBehavior => string.Equals(CategoryName, "Download Behavior", StringComparison.Ordinal); diff --git a/OF DL.Gui/ViewModels/MainWindowViewModel.cs b/OF DL.Gui/ViewModels/MainWindowViewModel.cs index 2cb6c2b..e51e985 100644 --- a/OF DL.Gui/ViewModels/MainWindowViewModel.cs +++ b/OF DL.Gui/ViewModels/MainWindowViewModel.cs @@ -485,7 +485,7 @@ public partial class MainWindowViewModel( RefreshIgnoredUsersListsCommand.NotifyCanExecuteChanged(); } - [RelayCommand] + [RelayCommand(CanExecute = nameof(CanEditConfig))] private void EditConfig() { if (CurrentScreen == AppScreen.Config) @@ -824,6 +824,8 @@ public partial class MainWindowViewModel( private bool CanLogout() => IsAuthenticated && !IsDownloading; + private bool CanEditConfig() => CurrentScreen != AppScreen.Config; + partial void OnCurrentScreenChanged(AppScreen value) { OnPropertyChanged(nameof(IsLoadingScreen)); @@ -839,6 +841,7 @@ public partial class MainWindowViewModel( RefreshUsersCommand.NotifyCanExecuteChanged(); RefreshIgnoredUsersListsCommand.NotifyCanExecuteChanged(); LogoutCommand.NotifyCanExecuteChanged(); + EditConfigCommand.NotifyCanExecuteChanged(); } partial void OnIsDownloadingChanged(bool value) @@ -1649,8 +1652,6 @@ public partial class MainWindowViewModel( or nameof(Config.NonInteractiveModeListName) or nameof(Config.NonInteractiveModePurchasedTab) or nameof(Config.DisableBrowserAuth) - or nameof(Config.FFmpegPath) - or nameof(Config.FFprobePath) or nameof(Config.DownloadPath) or nameof(Config.DrmVideoDurationMatchThreshold) or nameof(Config.DownloadVideos) @@ -1672,6 +1673,7 @@ public partial class MainWindowViewModel( { nameof(Config.DisableBrowserAuth) => "Auth", nameof(Config.FFmpegPath) => "External", + nameof(Config.FFprobePath) => "External", nameof(Config.DownloadAvatarHeaderPhoto) => "Download Media Types", nameof(Config.DownloadPaidPosts) => "Download Media Types", @@ -1743,7 +1745,7 @@ public partial class MainWindowViewModel( }; private static bool IsLeftColumnCategory(string categoryName) => - categoryName is "Appearance" or "Logging" or "Download Behavior" or "Subscriptions"; + categoryName is "Appearance" or "Logging" or "External" or "Download Behavior" or "Subscriptions"; private static bool IsRightColumnCategory(string categoryName) => categoryName is "File Naming" or "Folder Structure" or "Performance"; @@ -1753,8 +1755,9 @@ public partial class MainWindowViewModel( { "Appearance" => 1, "Logging" => 2, - "Download Behavior" => 3, - "Subscriptions" => 4, + "External" => 3, + "Download Behavior" => 4, + "Subscriptions" => 5, _ => 100 }; diff --git a/OF DL.Gui/Views/AboutWindow.axaml b/OF DL.Gui/Views/AboutWindow.axaml index 987473f..d5f33f0 100644 --- a/OF DL.Gui/Views/AboutWindow.axaml +++ b/OF DL.Gui/Views/AboutWindow.axaml @@ -5,99 +5,144 @@ xmlns:views="using:OF_DL.Gui.Views" x:Class="OF_DL.Gui.Views.AboutWindow" x:DataType="views:AboutWindow" - Width="760" + Width="600" Height="520" - MinWidth="620" - MinHeight="440" + MinWidth="550" + MinHeight="420" Title="About OF DL" Background="{DynamicResource WindowBackgroundBrush}" mc:Ignorable="d"> - - - + + + + - - - + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + +