Paste import functionality moved to server list

https://github.com/2dust/v2rayN/issues/6201
pull/6211/head
2dust 2024-12-02 11:01:32 +08:00
parent b4c37d9906
commit 834e05999f
2 changed files with 6 additions and 7 deletions

View File

@ -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;

View File

@ -228,6 +228,12 @@ namespace v2rayN.Views
{
switch (e.Key)
{
case Key.V:
var clipboardData = WindowsUtils.GetClipboardData();
var service = Locator.Current.GetService<MainWindowViewModel>();
if (service != null) _ = service.AddServerViaClipboardAsync(clipboardData);
break;
case Key.A:
menuSelectAll_Click(null, null);
break;