Skip to content

Commit

Permalink
Paste import functionality moved to server list
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Dec 2, 2024
1 parent b4c37d9 commit 834e059
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 0 additions & 7 deletions v2rayN/v2rayN/Views/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -283,13 +283,6 @@ private void MainWindow_PreviewKeyDown(object sender, KeyEventArgs e)
{
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;
Expand Down
6 changes: 6 additions & 0 deletions v2rayN/v2rayN/Views/ProfilesView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,12 @@ private void LstProfiles_PreviewKeyDown(object sender, KeyEventArgs e)
{
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;
Expand Down

0 comments on commit 834e059

Please sign in to comment.