From 743845823799c8b169f4958c1b791c9c7e3c75f5 Mon Sep 17 00:00:00 2001 From: MaxFan Date: Mon, 11 May 2026 19:55:26 +0330 Subject: [PATCH] Fix help donation actions and remove internal docs --- .gitignore | 2 ++ AppTunnel/MainWindow.xaml.cs | 3 ++- AppTunnel/Services/AppInfo.cs | 6 +++--- AppTunnel/ViewModels/MainViewModel.Core.cs | 22 +++++++++++++++++++++- AppTunnel/Views/HelpTabView.xaml | 22 ++++++++++++++-------- CHANGELOG.md | 2 +- README.md | 4 ++-- docs/BUILD.md | 2 +- 8 files changed, 46 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index 7a90933..c91265d 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,8 @@ create-ico.ps1 # Personal notes and exported documents *.docx +docs/PRIVACY_REVIEW.md +docs/PUBLISHING_CHECKLIST.md # Logs and temporary files *.log diff --git a/AppTunnel/MainWindow.xaml.cs b/AppTunnel/MainWindow.xaml.cs index e2894fc..b6f9e20 100644 --- a/AppTunnel/MainWindow.xaml.cs +++ b/AppTunnel/MainWindow.xaml.cs @@ -377,7 +377,8 @@ public partial class MainWindow : Window { var helpWindow = new AppTunnel.Views.HelpWindow { - Owner = this + Owner = this, + DataContext = _viewModel }; helpWindow.ShowDialog(); } diff --git a/AppTunnel/Services/AppInfo.cs b/AppTunnel/Services/AppInfo.cs index 0ad6248..670add8 100644 --- a/AppTunnel/Services/AppInfo.cs +++ b/AppTunnel/Services/AppInfo.cs @@ -9,9 +9,9 @@ public static class AppInfo public const string PayPalEmail = "gallafan@gmail.com"; public const string PayPalDonateUrl = "https://www.paypal.com/donate/?business=gallafan%40gmail.com¤cy_code=USD"; public const string CryptoDonationText = - "TRON / USDT-TRC20: TNWV867fQDT6zpLunHgbeMjrN6ic63LQSu\n" + - "Bitcoin: bc1qgx3g47c458fu6smnpqpu0l05hha82rq2xjet4y\n" + - "Ethereum / USDT-ERC20: 0x72d94Bb250E8802441a0ED05686Ee925BC99Fef5\n" + + "ترون / USDT روی TRC20: TNWV867fQDT6zpLunHgbeMjrN6ic63LQSu\n" + + "بیت‌کوین: bc1qgx3g47c458fu6smnpqpu0l05hha82rq2xjet4y\n" + + "اتریوم / USDT روی ERC20: 0x72d94Bb250E8802441a0ED05686Ee925BC99Fef5\n" + "TON: UQD65oL2Vu2OJDSrwQ0wLLSw3g668SREMJ3VPW9k8b6Sy-Yf\n" + "BNB Smart Chain: 0xE2a5b01cE2b3713D435Bc16d92eAdd88A82159f0\n" + "Dogecoin: DSZRNY65yF679uvjAh6sUAt6YiEEQHwKGb"; diff --git a/AppTunnel/ViewModels/MainViewModel.Core.cs b/AppTunnel/ViewModels/MainViewModel.Core.cs index c52fec9..fc76500 100644 --- a/AppTunnel/ViewModels/MainViewModel.Core.cs +++ b/AppTunnel/ViewModels/MainViewModel.Core.cs @@ -64,6 +64,7 @@ public partial class MainViewModel : INotifyPropertyChanged ClearConfigCommand = new RelayCommand(_ => SelectedV2RayConfig = "", _ => !IsConnected && CurrentTunnelType == TunnelType.V2Ray); OpenGitHubCommand = new RelayCommand(_ => OpenExternalLink(AppInfo.GitHubUrl)); OpenDonateCommand = new RelayCommand(_ => OpenExternalLink(AppInfo.PayPalDonateUrl)); + CopyDonationInfoCommand = new RelayCommand(_ => CopyDonationInfoToClipboard()); _trafficRouter.TrafficUpdated += OnTrafficUpdated; @@ -247,7 +248,7 @@ public partial class MainViewModel : INotifyPropertyChanged public string AppCreatorText => AppInfo.CreatorText; public string AppGitHubUrl => AppInfo.GitHubUrl; public string AppLicenseText => AppInfo.LicenseName; - public string DonatePayPalText => $"PayPal: {AppInfo.PayPalEmail}"; + public string DonatePayPalText => $"پی‌پل: {AppInfo.PayPalEmail}"; public string CryptoDonationText => AppInfo.CryptoDonationText; public string ConnectButtonText => _connectionState switch @@ -617,6 +618,7 @@ public partial class MainViewModel : INotifyPropertyChanged public ICommand ClearConfigCommand { get; } public ICommand OpenGitHubCommand { get; } public ICommand OpenDonateCommand { get; } + public ICommand CopyDonationInfoCommand { get; } #endregion @@ -638,6 +640,24 @@ public partial class MainViewModel : INotifyPropertyChanged } } + private void CopyDonationInfoToClipboard() + { + try + { + var text = + $"{AppInfo.AppName} - حمایت از پروژه\n" + + $"PayPal: {AppInfo.PayPalEmail}\n" + + $"PayPal link: {AppInfo.PayPalDonateUrl}\n\n" + + AppInfo.CryptoDonationText; + System.Windows.Clipboard.SetText(text); + Logger.Info("[UI] Donation info copied to clipboard"); + } + catch (Exception ex) + { + Logger.Warning($"[UI] Copy donation info failed: {ex.Message}"); + } + } + private void PasteConfigFromClipboard() { try diff --git a/AppTunnel/Views/HelpTabView.xaml b/AppTunnel/Views/HelpTabView.xaml index 00c46f5..b549208 100644 --- a/AppTunnel/Views/HelpTabView.xaml +++ b/AppTunnel/Views/HelpTabView.xaml @@ -61,7 +61,7 @@ Foreground="{StaticResource AccentBrush}" FlowDirection="LeftToRight" TextWrapping="Wrap"/> - + Orientation="Vertical" + VerticalAlignment="Center" + MinWidth="150">