mirror of
https://github.com/2dust/v2rayN.git
synced 2026-01-15 10:29:33 +00:00
Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe183798b6 | ||
|
|
947c84cf10 |
5 changed files with 26 additions and 19 deletions
|
|
@ -214,9 +214,10 @@ public class ActionPrecheckManager
|
||||||
return errors;
|
return errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
var childIds = Utils.String2List(group.ChildItems) ?? [];
|
var childIds = new List<string>();
|
||||||
var subItems = await ProfileGroupItemManager.GetSubChildProfileItems(group);
|
var subItems = await ProfileGroupItemManager.GetSubChildProfileItems(group);
|
||||||
childIds.AddRange(subItems.Select(p => p.IndexId));
|
childIds.AddRange(subItems.Select(p => p.IndexId));
|
||||||
|
childIds.AddRange(Utils.String2List(group.ChildItems));
|
||||||
|
|
||||||
foreach (var child in childIds)
|
foreach (var child in childIds)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -230,9 +230,10 @@ public class ProfileGroupItemManager
|
||||||
{
|
{
|
||||||
return (new List<ProfileItem>(), profileGroupItem);
|
return (new List<ProfileItem>(), profileGroupItem);
|
||||||
}
|
}
|
||||||
var items = await GetChildProfileItems(profileGroupItem);
|
|
||||||
var subItems = await GetSubChildProfileItems(profileGroupItem);
|
var items = new List<ProfileItem>();
|
||||||
items.AddRange(subItems);
|
items.AddRange(await GetSubChildProfileItems(profileGroupItem));
|
||||||
|
items.AddRange(await GetChildProfileItems(profileGroupItem));
|
||||||
|
|
||||||
return (items, profileGroupItem);
|
return (items, profileGroupItem);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ public class ProfilesViewModel : MyReactiveObject
|
||||||
public ReactiveCommand<Unit, Unit> MoveUpCmd { get; }
|
public ReactiveCommand<Unit, Unit> MoveUpCmd { get; }
|
||||||
public ReactiveCommand<Unit, Unit> MoveDownCmd { get; }
|
public ReactiveCommand<Unit, Unit> MoveDownCmd { get; }
|
||||||
public ReactiveCommand<Unit, Unit> MoveBottomCmd { get; }
|
public ReactiveCommand<Unit, Unit> MoveBottomCmd { get; }
|
||||||
|
public ReactiveCommand<SubItem, Unit> MoveToGroupCmd { get; }
|
||||||
|
|
||||||
//servers ping
|
//servers ping
|
||||||
public ReactiveCommand<Unit, Unit> MixedTestServerCmd { get; }
|
public ReactiveCommand<Unit, Unit> MixedTestServerCmd { get; }
|
||||||
|
|
@ -179,6 +180,10 @@ public class ProfilesViewModel : MyReactiveObject
|
||||||
{
|
{
|
||||||
await MoveServer(EMove.Bottom);
|
await MoveServer(EMove.Bottom);
|
||||||
}, canEditRemove);
|
}, canEditRemove);
|
||||||
|
MoveToGroupCmd = ReactiveCommand.CreateFromTask<SubItem>(async sub =>
|
||||||
|
{
|
||||||
|
SelectedMoveToGroup = sub;
|
||||||
|
});
|
||||||
|
|
||||||
//servers ping
|
//servers ping
|
||||||
FastRealPingCmd = ReactiveCommand.CreateFromTask(async () =>
|
FastRealPingCmd = ReactiveCommand.CreateFromTask(async () =>
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
|
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
|
||||||
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
|
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
|
||||||
|
x:Name="Root"
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
x:DataType="vms:ProfilesViewModel"
|
x:DataType="vms:ProfilesViewModel"
|
||||||
|
|
@ -141,19 +142,18 @@
|
||||||
InputGesture="Ctrl+T" />
|
InputGesture="Ctrl+T" />
|
||||||
<MenuItem x:Name="menuSortServerResult" Header="{x:Static resx:ResUI.menuSortServerResult}" />
|
<MenuItem x:Name="menuSortServerResult" Header="{x:Static resx:ResUI.menuSortServerResult}" />
|
||||||
<Separator />
|
<Separator />
|
||||||
<MenuItem x:Name="menuMoveToGroup" Header="{x:Static resx:ResUI.menuMoveToGroup}">
|
<MenuItem
|
||||||
<MenuItem>
|
x:Name="menuMoveToGroup"
|
||||||
<MenuItem.Header>
|
Header="{x:Static resx:ResUI.menuMoveToGroup}"
|
||||||
<DockPanel>
|
ItemsSource="{Binding DataContext.SubItems, ElementName=Root}">
|
||||||
<ComboBox
|
<MenuItem.ItemTemplate>
|
||||||
x:Name="cmbMoveToGroup"
|
<DataTemplate>
|
||||||
Width="200"
|
<MenuItem
|
||||||
DisplayMemberBinding="{Binding Remarks}"
|
Command="{Binding DataContext.MoveToGroupCmd, ElementName=Root}"
|
||||||
ItemsSource="{Binding SubItems}"
|
CommandParameter="{Binding}"
|
||||||
ToolTip.Tip="{x:Static resx:ResUI.menuSubscription}" />
|
Header="{Binding Remarks}" />
|
||||||
</DockPanel>
|
</DataTemplate>
|
||||||
</MenuItem.Header>
|
</MenuItem.ItemTemplate>
|
||||||
</MenuItem>
|
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem Header="{x:Static resx:ResUI.menuMoveTo}">
|
<MenuItem Header="{x:Static resx:ResUI.menuMoveTo}">
|
||||||
<MenuItem
|
<MenuItem
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ public partial class ProfilesView : ReactiveUserControl<ProfilesViewModel>
|
||||||
|
|
||||||
//servers move
|
//servers move
|
||||||
//this.OneWayBind(ViewModel, vm => vm.SubItems, v => v.cmbMoveToGroup.ItemsSource).DisposeWith(disposables);
|
//this.OneWayBind(ViewModel, vm => vm.SubItems, v => v.cmbMoveToGroup.ItemsSource).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.SelectedMoveToGroup, v => v.cmbMoveToGroup.SelectedItem).DisposeWith(disposables);
|
//this.Bind(ViewModel, vm => vm.SelectedMoveToGroup, v => v.cmbMoveToGroup.SelectedItem).DisposeWith(disposables);
|
||||||
|
|
||||||
this.BindCommand(ViewModel, vm => vm.MoveTopCmd, v => v.menuMoveTop).DisposeWith(disposables);
|
this.BindCommand(ViewModel, vm => vm.MoveTopCmd, v => v.menuMoveTop).DisposeWith(disposables);
|
||||||
this.BindCommand(ViewModel, vm => vm.MoveUpCmd, v => v.menuMoveUp).DisposeWith(disposables);
|
this.BindCommand(ViewModel, vm => vm.MoveUpCmd, v => v.menuMoveUp).DisposeWith(disposables);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue