From f1a55d12692754e95916433067e682656cc1e952 Mon Sep 17 00:00:00 2001 From: 0x5BFA <62196528+0x5bfa@users.noreply.github.com> Date: Thu, 22 Feb 2024 03:37:46 +0900 Subject: [PATCH 01/10] Initial commit --- src/Files.App/Constants.cs | 3 ++ .../Dialogs/ReinstallPromptDialog.xaml | 18 ++++++++++ .../Dialogs/ReinstallPromptDialog.xaml.cs | 30 ++++++++++++++++ src/Files.App/Files.App.csproj | 9 +++++ .../UserControls/AddressToolbar.xaml | 35 ++++++++++++++++++- .../UserControls/AddressToolbar.xaml.cs | 9 +++++ 6 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 src/Files.App/Dialogs/ReinstallPromptDialog.xaml create mode 100644 src/Files.App/Dialogs/ReinstallPromptDialog.xaml.cs diff --git a/src/Files.App/Constants.cs b/src/Files.App/Constants.cs index f99cb68fd284..d0dbf4543262 100644 --- a/src/Files.App/Constants.cs +++ b/src/Files.App/Constants.cs @@ -236,6 +236,9 @@ public static class GitHub public const string BugReportUrl = @"https://github.com/files-community/Files/issues/new?labels=bug&template=bug_report.yml"; public const string PrivacyPolicyUrl = @"https://github.com/files-community/Files/blob/main/.github/PRIVACY.md"; public const string SupportUsUrl = @"https://github.com/sponsors/yaira2"; + + // NOTE: This is a temporary constant variable + public const string ReinstallationNoticeDocsUrl = @"https://files.community/docs/install#:~:text=Steps%20required%20for%20the%20\“classic%20installer\”%20version%20after%203/21/2024"; } public static class DocsPath diff --git a/src/Files.App/Dialogs/ReinstallPromptDialog.xaml b/src/Files.App/Dialogs/ReinstallPromptDialog.xaml new file mode 100644 index 000000000000..f9022970463a --- /dev/null +++ b/src/Files.App/Dialogs/ReinstallPromptDialog.xaml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/src/Files.App/Dialogs/ReinstallPromptDialog.xaml.cs b/src/Files.App/Dialogs/ReinstallPromptDialog.xaml.cs new file mode 100644 index 000000000000..57d9aa25ee45 --- /dev/null +++ b/src/Files.App/Dialogs/ReinstallPromptDialog.xaml.cs @@ -0,0 +1,30 @@ +// Copyright (c) 2023 Files Community +// Licensed under the MIT License. See the LICENSE. + +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; +using Windows.System; + +namespace Files.App.Dialogs +{ + /// + /// Shows a dialog to notify user the importance of re-install temporarily. + /// + public sealed partial class ReinstallPromptDialog : ContentDialog + { + public ReinstallPromptDialog() + { + this.InitializeComponent(); + } + + private async void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) + { + await Launcher.LaunchUriAsync(new Uri(Constants.GitHub.ReinstallationNoticeDocsUrl)); + } + } +} diff --git a/src/Files.App/Files.App.csproj b/src/Files.App/Files.App.csproj index 54206be65497..c2ce9947e479 100644 --- a/src/Files.App/Files.App.csproj +++ b/src/Files.App/Files.App.csproj @@ -39,6 +39,9 @@ TRACE;RELEASE;NETFX_CORE;DISABLE_XAML_GENERATED_MAIN true + + + @@ -146,4 +149,10 @@ + + + MSBuild:Compile + + + diff --git a/src/Files.App/UserControls/AddressToolbar.xaml b/src/Files.App/UserControls/AddressToolbar.xaml index ae5f6861a303..786a73167a31 100644 --- a/src/Files.App/UserControls/AddressToolbar.xaml +++ b/src/Files.App/UserControls/AddressToolbar.xaml @@ -27,11 +27,28 @@ + + + + + + + + + + + + + + + + +