Fix help donation actions and remove internal docs

This commit is contained in:
MaxFan
2026-05-11 19:55:26 +03:30
parent 290083e809
commit 7438458237
8 changed files with 46 additions and 17 deletions
+21 -1
View File
@@ -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