From ba687e51d602110d067f7f588239fc51ca928df8 Mon Sep 17 00:00:00 2001 From: Cinka Date: Fri, 27 Dec 2024 08:22:17 +0300 Subject: [PATCH] - tweak: Search think --- Nebula.Launcher/CurrentConVar.cs | 3 + Nebula.Launcher/FileApis/FileApi.cs | 5 +- .../Services/ConfigurationService.cs | 95 +++++++++++++----- Nebula.Launcher/Services/FileService.cs | 6 +- .../Services/PopupMessageService.cs | 36 +++++++ Nebula.Launcher/Utils/DelegateCommand.cs | 28 ++++++ Nebula.Launcher/Utils/Ref.cs | 6 ++ .../ViewModels/AccountInfoViewModel.cs | 97 ++++++++++++------- .../ViewModels/InfoPopupViewModel.cs | 1 + Nebula.Launcher/ViewModels/MainViewModel.cs | 91 +++++++++++------ .../ViewModels/MessagePopupViewModel.cs | 68 ------------- .../ViewModels/ServerListViewModel.cs | 28 +++++- Nebula.Launcher/Views/MainView.axaml | 39 +++++++- Nebula.Launcher/Views/MainWindow.axaml | 6 +- .../Views/Pages/AccountInfoView.axaml | 21 ++-- .../Views/Pages/ServerListView.axaml | 2 +- .../Views/Pages/ServerListView.axaml.cs | 6 ++ .../Views/Popup/MessagePopupView.axaml | 53 ---------- .../Views/Popup/MessagePopupView.axaml.cs | 26 ----- 19 files changed, 372 insertions(+), 245 deletions(-) create mode 100644 Nebula.Launcher/Services/PopupMessageService.cs create mode 100644 Nebula.Launcher/Utils/DelegateCommand.cs create mode 100644 Nebula.Launcher/Utils/Ref.cs delete mode 100644 Nebula.Launcher/ViewModels/MessagePopupViewModel.cs delete mode 100644 Nebula.Launcher/Views/Popup/MessagePopupView.axaml delete mode 100644 Nebula.Launcher/Views/Popup/MessagePopupView.axaml.cs diff --git a/Nebula.Launcher/CurrentConVar.cs b/Nebula.Launcher/CurrentConVar.cs index dff0042..28099ad 100644 --- a/Nebula.Launcher/CurrentConVar.cs +++ b/Nebula.Launcher/CurrentConVar.cs @@ -19,4 +19,7 @@ public static class CurrentConVar public static readonly ConVar AuthServers = ConVar.Build("launcher.authServers", [ "https://auth.spacestation14.com/api/auth" ]); + + public static readonly ConVar AuthProfiles = ConVar.Build("auth.profiles", []); + public static readonly ConVar AuthCurrent = ConVar.Build("auth.current"); } \ No newline at end of file diff --git a/Nebula.Launcher/FileApis/FileApi.cs b/Nebula.Launcher/FileApis/FileApi.cs index 1e8202e..d12881a 100644 --- a/Nebula.Launcher/FileApis/FileApi.cs +++ b/Nebula.Launcher/FileApis/FileApi.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.IO; using Nebula.Launcher.FileApis.Interfaces; @@ -34,6 +35,8 @@ public class FileApi : IReadWriteFileApi using var stream = File.OpenWrite(currPath); input.CopyTo(stream); + stream.Flush(true); + Console.WriteLine(input.Length + " " + stream.Length); stream.Close(); return true; } diff --git a/Nebula.Launcher/Services/ConfigurationService.cs b/Nebula.Launcher/Services/ConfigurationService.cs index 3880f43..e12f927 100644 --- a/Nebula.Launcher/Services/ConfigurationService.cs +++ b/Nebula.Launcher/Services/ConfigurationService.cs @@ -1,5 +1,8 @@ using System; using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Text.Json; +using System.Text.Json.Serialization.Metadata; namespace Nebula.Launcher.Services; @@ -25,38 +28,86 @@ public class ConVar [ServiceRegister] public class ConfigurationService { - public ConfigurationService() + private readonly FileService _fileService; + private readonly DebugService _debugService; + + public ConfigurationService(FileService fileService, DebugService debugService) { - + _fileService = fileService; + _debugService = debugService; } public object? GetConfigValue(ConVar conVar) { - return conVar.DefaultValue; - } + if(!_fileService.ConfigurationApi.TryOpen(conVar.Name, out var stream) || + !ReadStream(stream, conVar.Type, out var obj)) + return conVar.DefaultValue; - public T? GetConfigValue(ConVar conVar) - { - var value = GetConfigValue(conVar); - if (value is not T tv) return default; - return tv; - } - - public bool TryGetConfigValue(ConVar conVar,[NotNullWhen(true)] out object? value) - { - value = GetConfigValue(conVar); - return value != null; - } - - public bool TryGetConfigValue(ConVar conVar, [NotNullWhen(true)] out T? value) - { - value = GetConfigValue(conVar); - return value != null; + _debugService.Log("Loading config file: " + conVar.Name); + + return obj; } public void SetConfigValue(ConVar conVar, object value) { - if(conVar.Type != value.GetType()) + if(conVar.Type != value.GetType()) + { + _debugService.Error("Error config file " + conVar.Name + ": Type is not equals " + value.GetType() + " " + conVar.Type); return; + } + + _debugService.Log("Saving config file: " + conVar.Name); + + var stream = new MemoryStream(); + try + { + using var st = new StreamWriter(stream); + st.Write(JsonSerializer.Serialize(value)); + st.Flush(); + _fileService.ConfigurationApi.Save(conVar.Name, st.BaseStream); + } + catch (Exception e) + { + _debugService.Error(e.Message); + } + + stream.Close(); + } + + private bool ReadStream(Stream stream, Type type,[NotNullWhen(true)] out object? obj) + { + obj = null; + try + { + obj = JsonSerializer.Deserialize(stream, JsonTypeInfo.CreateJsonTypeInfo(type, JsonSerializerOptions.Default)); + return obj != null; + } + catch (Exception e) + { + _debugService.Error(e.Message); + return false; + } + } +} + +public static class ConfigExt +{ + public static T? GetConfigValue(this ConfigurationService configurationService,ConVar conVar) + { + var value = configurationService.GetConfigValue(conVar); + if (value is not T tv) return default; + return tv; + } + + public static bool TryGetConfigValue(this ConfigurationService configurationService,ConVar conVar,[NotNullWhen(true)] out object? value) + { + value = configurationService.GetConfigValue(conVar); + return value != null; + } + + public static bool TryGetConfigValue(this ConfigurationService configurationService,ConVar conVar, [NotNullWhen(true)] out T? value) + { + value = configurationService.GetConfigValue(conVar); + return value != null; } } \ No newline at end of file diff --git a/Nebula.Launcher/Services/FileService.cs b/Nebula.Launcher/Services/FileService.cs index ffd83a0..178283f 100644 --- a/Nebula.Launcher/Services/FileService.cs +++ b/Nebula.Launcher/Services/FileService.cs @@ -11,16 +11,19 @@ using Robust.LoaderApi; namespace Nebula.Launcher.Services; +[ServiceRegister] public class FileService { public static string RootPath = Path.Join(Environment.GetFolderPath( Environment.SpecialFolder.ApplicationData), "./Datum/"); private readonly DebugService _debugService; + public readonly IReadWriteFileApi ContentFileApi; - public readonly IReadWriteFileApi EngineFileApi; public readonly IReadWriteFileApi ManifestFileApi; + public readonly IReadWriteFileApi ConfigurationApi; + private HashApi? _hashApi; public FileService(DebugService debugService) @@ -29,6 +32,7 @@ public class FileService ContentFileApi = CreateFileApi("content/"); EngineFileApi = CreateFileApi("engine/"); ManifestFileApi = CreateFileApi("manifest/"); + ConfigurationApi = CreateFileApi("config/"); } public List ManifestItems diff --git a/Nebula.Launcher/Services/PopupMessageService.cs b/Nebula.Launcher/Services/PopupMessageService.cs new file mode 100644 index 0000000..84ad41e --- /dev/null +++ b/Nebula.Launcher/Services/PopupMessageService.cs @@ -0,0 +1,36 @@ +using System; +using Microsoft.Extensions.DependencyInjection; +using Nebula.Launcher.ViewModels; + +namespace Nebula.Launcher.Services; + +[ServiceRegister] +public class PopupMessageService +{ + private readonly IServiceProvider _serviceProvider; + + public Action? OnPopupRequired; + + public PopupMessageService(IServiceProvider serviceProvider) + { + _serviceProvider = serviceProvider; + + } + + public void PopupInfo(string info) + { + var message = _serviceProvider.GetService(); + message.InfoText = info; + PopupMessage(message); + } + + public void PopupMessage(PopupViewModelBase viewModelBase) + { + OnPopupRequired?.Invoke(viewModelBase); + } + + public void ClosePopup() + { + OnPopupRequired?.Invoke(null); + } +} \ No newline at end of file diff --git a/Nebula.Launcher/Utils/DelegateCommand.cs b/Nebula.Launcher/Utils/DelegateCommand.cs new file mode 100644 index 0000000..be0530a --- /dev/null +++ b/Nebula.Launcher/Utils/DelegateCommand.cs @@ -0,0 +1,28 @@ +using System; +using System.Windows.Input; +using Nebula.Launcher.ViewModels; + +namespace Nebula.Launcher.Utils; + +public class DelegateCommand : ICommand +{ + private readonly Action _func; + public readonly Ref TRef = new(); + + public DelegateCommand(Action func) + { + _func = func; + } + + public bool CanExecute(object? parameter) + { + return true; + } + + public void Execute(object? parameter) + { + _func(TRef.Value); + } + + public event EventHandler? CanExecuteChanged; +} \ No newline at end of file diff --git a/Nebula.Launcher/Utils/Ref.cs b/Nebula.Launcher/Utils/Ref.cs new file mode 100644 index 0000000..b350d03 --- /dev/null +++ b/Nebula.Launcher/Utils/Ref.cs @@ -0,0 +1,6 @@ +namespace Nebula.Launcher.Utils; + +public class Ref +{ + public T Value = default!; +} \ No newline at end of file diff --git a/Nebula.Launcher/ViewModels/AccountInfoViewModel.cs b/Nebula.Launcher/ViewModels/AccountInfoViewModel.cs index fc95a05..ad0d6ca 100644 --- a/Nebula.Launcher/ViewModels/AccountInfoViewModel.cs +++ b/Nebula.Launcher/ViewModels/AccountInfoViewModel.cs @@ -1,9 +1,11 @@ using System; using System.Collections.ObjectModel; +using System.Linq; using System.Windows.Input; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using Nebula.Launcher.Services; +using Nebula.Launcher.Utils; using Nebula.Launcher.ViewHelper; using Nebula.Launcher.Views.Pages; @@ -12,6 +14,8 @@ namespace Nebula.Launcher.ViewModels; [ViewRegister(typeof(AccountInfoView))] public partial class AccountInfoViewModel : ViewModelBase { + private readonly PopupMessageService _popupMessageService; + private readonly ConfigurationService _configurationService; private readonly AuthService _authService; public ObservableCollection Accounts { get; } = new(); @@ -25,20 +29,39 @@ public partial class AccountInfoViewModel : ViewModelBase [ObservableProperty] private string _currentAuthServer = String.Empty; + public ObservableCollection AuthUrls { get; } = new(); + [ObservableProperty] private bool _pageEnabled = true; - public AuthLoginPassword CurrentALP => new AuthLoginPassword(CurrentLogin, CurrentPassword, CurrentAuthServer); + private AuthLoginPassword CurrentAlp + { + get => new(CurrentLogin, CurrentPassword, CurrentAuthServer); + set + { + CurrentLogin = value.Login; + CurrentPassword = value.Password; + CurrentAuthServer = value.AuthServer; + } + } //Design think public AccountInfoViewModel() { AddAccount(new AuthLoginPassword("Binka","12341","")); + AuthUrls.Add("https://cinka.ru"); + AuthUrls.Add("https://cinka.ru"); } //Real think - public AccountInfoViewModel(IServiceProvider serviceProvider, AuthService authService) : base(serviceProvider) + public AccountInfoViewModel(IServiceProvider serviceProvider, PopupMessageService popupMessageService, + ConfigurationService configurationService, AuthService authService) : base(serviceProvider) { + //_popupMessageService = mainViewModel; + _popupMessageService = popupMessageService; + _configurationService = configurationService; _authService = authService; + + ReadAuthConfig(); } public void AuthByALP(AuthLoginPassword authLoginPassword) @@ -52,12 +75,18 @@ public partial class AccountInfoViewModel : ViewModelBase public async void DoAuth() { - PageEnabled = false; - if(await _authService.Auth(CurrentALP)) - Console.WriteLine("Hello, " + _authService.SelectedAuth!.Username); + _popupMessageService.PopupInfo("Auth think, please wait..."); + + if(await _authService.Auth(CurrentAlp)) + { + _popupMessageService.ClosePopup(); + _popupMessageService.PopupInfo("Hello, " + _authService.SelectedAuth!.Username); + } else - Console.WriteLine("Shit!"); - PageEnabled = true; + { + _popupMessageService.ClosePopup(); + _popupMessageService.PopupInfo("Well, shit is happened"); + } } private void AddAccount(AuthLoginPassword authLoginPassword) @@ -78,39 +107,41 @@ public partial class AccountInfoViewModel : ViewModelBase Accounts.Add(alpm); } + private void ReadAuthConfig() + { + foreach (var profile in + _configurationService.GetConfigValue(CurrentConVar.AuthProfiles)!) + { + AddAccount(profile); + } + + var currProfile = _configurationService.GetConfigValue(CurrentConVar.AuthProfiles); + + if (currProfile != null) + { + CurrentAlp = currProfile; + DoAuth(); + } + + AuthUrls.Clear(); + var authUrls = _configurationService.GetConfigValue(CurrentConVar.AuthServers)!; + foreach (var url in authUrls) + { + AuthUrls.Add(url); + } + } + [RelayCommand] public void OnSaveProfile() { - AddAccount(CurrentALP); + AddAccount(CurrentAlp); + _configurationService.SetConfigValue(CurrentConVar.AuthProfiles, Accounts.Select(a => (AuthLoginPassword) a).ToArray()); } -} -public class Ref -{ - public T Value = default!; -} - -public class DelegateCommand : ICommand -{ - private readonly Action _func; - public readonly Ref TRef = new(); - - public DelegateCommand(Action func) + public string AuthItemSelect { - _func = func; + set => CurrentAuthServer = value; } - - public bool CanExecute(object? parameter) - { - return true; - } - - public void Execute(object? parameter) - { - _func(TRef.Value); - } - - public event EventHandler? CanExecuteChanged; } public record AuthLoginPasswordModel(string Login, string Password, string AuthServer, ICommand OnSelect = default!, ICommand OnDelete = default!) diff --git a/Nebula.Launcher/ViewModels/InfoPopupViewModel.cs b/Nebula.Launcher/ViewModels/InfoPopupViewModel.cs index c7e8bf0..59d80a3 100644 --- a/Nebula.Launcher/ViewModels/InfoPopupViewModel.cs +++ b/Nebula.Launcher/ViewModels/InfoPopupViewModel.cs @@ -15,6 +15,7 @@ public partial class InfoPopupViewModel : PopupViewModelBase public InfoPopupViewModel(IServiceProvider serviceProvider) : base(serviceProvider) { } + public override string Title => "Info"; [ObservableProperty] diff --git a/Nebula.Launcher/ViewModels/MainViewModel.cs b/Nebula.Launcher/ViewModels/MainViewModel.cs index 8861cae..3083c3d 100644 --- a/Nebula.Launcher/ViewModels/MainViewModel.cs +++ b/Nebula.Launcher/ViewModels/MainViewModel.cs @@ -7,7 +7,9 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.DependencyInjection; using CommunityToolkit.Mvvm.Input; using CommunityToolkit.Mvvm.Messaging; +using Microsoft.Extensions.DependencyInjection; using Nebula.Launcher.Models; +using Nebula.Launcher.Services; using Nebula.Launcher.ViewHelper; using Nebula.Launcher.Views; using Nebula.Launcher.Views.Pages; @@ -21,39 +23,26 @@ public partial class MainViewModel : ViewModelBase { TryGetViewModel(typeof(AccountInfoViewModel), out var model); _currentPage = model!; - TryGetViewModel(typeof(MessagePopupViewModel), out var viewModelBase); - _messagePopupViewModel = (MessagePopupViewModel)viewModelBase!; Items = new ObservableCollection(_templates); SelectedListItem = Items.First(vm => vm.ModelType == typeof(AccountInfoViewModel)); } - public MainViewModel(AccountInfoViewModel accountInfoViewModel, MessagePopupViewModel messagePopupViewModel, + public MainViewModel(AccountInfoViewModel accountInfoViewModel, PopupMessageService popupMessageService, IServiceProvider serviceProvider): base(serviceProvider) { _currentPage = accountInfoViewModel; - _messagePopupViewModel = messagePopupViewModel; + _popupMessageService = popupMessageService; Items = new ObservableCollection(_templates); - - _messagePopupViewModel.OnOpenRequired += () => OnOpenRequired(); - _messagePopupViewModel.OnCloseRequired += () => OnCloseRequired(); + + _popupMessageService.OnPopupRequired += OnPopupRequired; SelectedListItem = Items.First(vm => vm.ModelType == typeof(AccountInfoViewModel)); } - private void OnCloseRequired() - { - IsEnabled = true; - Popup = false; - } - - private void OnOpenRequired() - { - IsEnabled = false; - Popup = true; - } - + private readonly Queue _viewQueue = new(); + private readonly List _templates = [ new ListItemTemplate(typeof(AccountInfoViewModel), "Account", "Account"), @@ -66,10 +55,15 @@ public partial class MainViewModel : ViewModelBase [ObservableProperty] private ViewModelBase _currentPage; + private readonly PopupMessageService _popupMessageService; + [ObservableProperty] private bool _isEnabled = true; [ObservableProperty] private bool _popup; - - private readonly MessagePopupViewModel _messagePopupViewModel; + + [ObservableProperty] + private PopupViewModelBase? _currentPopup; + [ObservableProperty] + private string _currentTitle = "Default"; [ObservableProperty] private ListItemTemplate? _selectedListItem; @@ -84,20 +78,63 @@ public partial class MainViewModel : ViewModelBase } CurrentPage = vmb; - - var model = GetViewModel(); - model.InfoText = "Переключили прикол!"; - - _messagePopupViewModel.PopupMessage(model); - } public ObservableCollection Items { get; } + + public void PopupMessage(PopupViewModelBase viewModelBase) + { + if (CurrentPopup == null) + { + CurrentPopup = viewModelBase; + CurrentTitle = viewModelBase.Title; + OnOpenRequired(); + } + else + { + _viewQueue.Enqueue(viewModelBase); + } + } + + private void OnCloseRequired() + { + IsEnabled = true; + Popup = false; + } + + private void OnOpenRequired() + { + IsEnabled = false; + Popup = true; + } + + private void OnPopupRequired(PopupViewModelBase? viewModelBase) + { + if (viewModelBase is null) + { + ClosePopup(); + } + else + { + PopupMessage(viewModelBase); + } + } [RelayCommand] private void TriggerPane() { IsPaneOpen = !IsPaneOpen; } + + [RelayCommand] + public void ClosePopup() + { + if (!_viewQueue.TryDequeue(out var viewModelBase)) + OnCloseRequired(); + else + CurrentTitle = viewModelBase.Title; + + CurrentPopup = viewModelBase; + } } diff --git a/Nebula.Launcher/ViewModels/MessagePopupViewModel.cs b/Nebula.Launcher/ViewModels/MessagePopupViewModel.cs deleted file mode 100644 index 80657b8..0000000 --- a/Nebula.Launcher/ViewModels/MessagePopupViewModel.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Windows.Input; -using Avalonia.Logging; -using CommunityToolkit.Mvvm.ComponentModel; -using CommunityToolkit.Mvvm.Input; -using Nebula.Launcher.ViewHelper; -using Nebula.Launcher.Views.Popup; - -namespace Nebula.Launcher.ViewModels; - -[ViewRegister(typeof(MessagePopupView))] -public partial class MessagePopupViewModel : ViewModelBase -{ - public MessagePopupViewModel() : base() - { - } - - public MessagePopupViewModel(IServiceProvider serviceProvider) : base(serviceProvider) - { - } - - public Action? OnCloseRequired; - public Action? OnOpenRequired; - - public Queue ViewQueue = new(); - - [ObservableProperty] - private PopupViewModelBase? _currentPopup; - - [ObservableProperty] - private string _currentTitle = "Default"; - - public void PopupMessage(PopupViewModelBase viewModelBase) - { - Console.WriteLine(viewModelBase.Title); - if (CurrentPopup == null) - { - CurrentPopup = viewModelBase; - CurrentTitle = viewModelBase.Title; - OnOpenRequired?.Invoke(); - } - else - { - ViewQueue.Enqueue(viewModelBase); - } - } - - [RelayCommand] - private void TriggerClose() - { - ClosePopup(); - } - - [RelayCommand] - private void ClosePopup() - { - Console.WriteLine("Gadeem"); - if (!ViewQueue.TryDequeue(out var viewModelBase)) - OnCloseRequired?.Invoke(); - else - CurrentTitle = viewModelBase.Title; - - CurrentPopup = viewModelBase; - - } -} \ No newline at end of file diff --git a/Nebula.Launcher/ViewModels/ServerListViewModel.cs b/Nebula.Launcher/ViewModels/ServerListViewModel.cs index f88bfca..e79a9f4 100644 --- a/Nebula.Launcher/ViewModels/ServerListViewModel.cs +++ b/Nebula.Launcher/ViewModels/ServerListViewModel.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Linq; using CommunityToolkit.Mvvm.ComponentModel; using Nebula.Launcher.Models; using Nebula.Launcher.Services; @@ -12,7 +13,11 @@ namespace Nebula.Launcher.ViewModels; [ViewRegister(typeof(ServerListView))] public partial class ServerListViewModel : ViewModelBase { - public ObservableCollection ServerInfos { get; } = new ObservableCollection(); + public ObservableCollection ServerInfos { get; } = new(); + + public Action? OnSearchChange; + + [ObservableProperty] private string _searchText; [ObservableProperty] private ServerHubInfo? _selectedListItem; @@ -29,6 +34,12 @@ public partial class ServerListViewModel : ViewModelBase public ServerListViewModel(IServiceProvider serviceProvider, HubService hubService) : base(serviceProvider) { hubService.HubServerChangedEventArgs += HubServerChangedEventArgs; + OnSearchChange += OnChangeSearch; + } + + private void OnChangeSearch() + { + SortServers(); } private void HubServerChangedEventArgs(HubServerChangedEventArgs obj) @@ -48,13 +59,24 @@ public partial class ServerListViewModel : ViewModelBase } } + SortServers(); + } + + private void SortServers() + { ServerInfos.Clear(); UnsortedServers.Sort(new ServerComparer()); - foreach (var VARIABLE in UnsortedServers) + foreach (var server in UnsortedServers.Where(CheckServerThink)) { - ServerInfos.Add(VARIABLE); + ServerInfos.Add(server); } } + + private bool CheckServerThink(ServerHubInfo hubInfo) + { + if (string.IsNullOrEmpty(SearchText)) return true; + return hubInfo.StatusData.Name.ToLower().Contains(SearchText.ToLower()); + } } public class ServerComparer : IComparer diff --git a/Nebula.Launcher/Views/MainView.axaml b/Nebula.Launcher/Views/MainView.axaml index 4f038d5..54da439 100644 --- a/Nebula.Launcher/Views/MainView.axaml +++ b/Nebula.Launcher/Views/MainView.axaml @@ -97,7 +97,44 @@ CornerRadius="10" Height="320" Width="520"> - + + + + + + diff --git a/Nebula.Launcher/Views/Pages/ServerListView.axaml.cs b/Nebula.Launcher/Views/Pages/ServerListView.axaml.cs index d19f897..6ed1ae3 100644 --- a/Nebula.Launcher/Views/Pages/ServerListView.axaml.cs +++ b/Nebula.Launcher/Views/Pages/ServerListView.axaml.cs @@ -17,4 +17,10 @@ public partial class ServerListView : UserControl { DataContext = viewModel; } + + private void TextBox_OnTextChanged(object? sender, TextChangedEventArgs e) + { + var context = (ServerListViewModel?)DataContext; + context?.OnSearchChange?.Invoke(); + } } \ No newline at end of file diff --git a/Nebula.Launcher/Views/Popup/MessagePopupView.axaml b/Nebula.Launcher/Views/Popup/MessagePopupView.axaml deleted file mode 100644 index c001fbb..0000000 --- a/Nebula.Launcher/Views/Popup/MessagePopupView.axaml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - -