New UI (not wired up)
This commit is contained in:
@@ -26,7 +26,7 @@ public partial class SubsSettingsViewModel(ISubscriptionDbService dbService, ISu
|
||||
}
|
||||
|
||||
public ObservableCollection<SubscriptionViewModel> Subscriptions { get; } = [];
|
||||
public ObservableCollection<ServerItemViewModel> Servers { get; } = [];
|
||||
public ObservableCollection<StandaloneServerViewModel> Servers { get; } = [];
|
||||
|
||||
public async Task LoadSubscriptionsAsync()
|
||||
{
|
||||
@@ -37,8 +37,6 @@ public partial class SubsSettingsViewModel(ISubscriptionDbService dbService, ISu
|
||||
Subscriptions.Add(new SubscriptionViewModel(subscription));
|
||||
}
|
||||
|
||||
Servers.Add(new StandaloneServerViewModel(new StandaloneServer() { Region = "NO", Title = "Not default title", DefaultTitle = "Default title" }) { Tags = { "VLESS", "GRPC", "REALITY" } });
|
||||
|
||||
ShowLoadingIndicator = false;
|
||||
}
|
||||
|
||||
@@ -66,13 +64,10 @@ public partial class SubsSettingsViewModel(ISubscriptionDbService dbService, ISu
|
||||
subscription.Title = customName;
|
||||
subscription.UpdateInterval = updateInterval;
|
||||
|
||||
Subscriptions.Add(new SubscriptionViewModel(subscription));
|
||||
foreach (var server in subscription.Servers)
|
||||
{
|
||||
var serverVM = new SubscriptionServerViewModel(server);
|
||||
foreach (var tag in _fetcher.GetTags(server.ConnectionString)) serverVM.Tags.Add(tag);
|
||||
Servers.Add(serverVM);
|
||||
}
|
||||
var sub = new SubscriptionViewModel(subscription);
|
||||
|
||||
Subscriptions.Add(sub);
|
||||
|
||||
ShowLoadingIndicator = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user