From 834e05999f2f9d101ed5c234bccc6248284c1fc6 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Mon, 2 Dec 2024 11:01:32 +0800 Subject: [PATCH] Paste import functionality moved to server list https://github.com/2dust/v2rayN/issues/6201 --- v2rayN/v2rayN/Views/MainWindow.xaml.cs | 7 ------- v2rayN/v2rayN/Views/ProfilesView.xaml.cs | 6 ++++++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/v2rayN/v2rayN/Views/MainWindow.xaml.cs b/v2rayN/v2rayN/Views/MainWindow.xaml.cs index 0243fcff..0dc59911 100644 --- a/v2rayN/v2rayN/Views/MainWindow.xaml.cs +++ b/v2rayN/v2rayN/Views/MainWindow.xaml.cs @@ -283,13 +283,6 @@ namespace v2rayN.Views { switch (e.Key) { - case Key.V: - if (_backupAndRestoreView?.IsVisible == true) return; - - var clipboardData = WindowsUtils.GetClipboardData(); - ViewModel?.AddServerViaClipboardAsync(clipboardData); - break; - case Key.S: ScanScreenTaskAsync().ContinueWith(_ => { }); break; diff --git a/v2rayN/v2rayN/Views/ProfilesView.xaml.cs b/v2rayN/v2rayN/Views/ProfilesView.xaml.cs index e39c7dff..36101b41 100644 --- a/v2rayN/v2rayN/Views/ProfilesView.xaml.cs +++ b/v2rayN/v2rayN/Views/ProfilesView.xaml.cs @@ -228,6 +228,12 @@ namespace v2rayN.Views { switch (e.Key) { + case Key.V: + var clipboardData = WindowsUtils.GetClipboardData(); + var service = Locator.Current.GetService(); + if (service != null) _ = service.AddServerViaClipboardAsync(clipboardData); + break; + case Key.A: menuSelectAll_Click(null, null); break;