diff --git a/src/NebulaAuth/App.xaml.cs b/src/NebulaAuth/App.xaml.cs
index d91f119..537f14a 100644
--- a/src/NebulaAuth/App.xaml.cs
+++ b/src/NebulaAuth/App.xaml.cs
@@ -1,8 +1,9 @@
-using System;
-using System.Windows;
-using NebulaAuth.Core;
+using NebulaAuth.Core;
using NebulaAuth.Model;
using NebulaAuth.Model.Exceptions;
+using NebulaAuth.Model.MAAC;
+using System;
+using System.Windows;
namespace NebulaAuth;
@@ -20,6 +21,7 @@ public partial class App
Shell.Initialize();
var threads = Environment.ProcessorCount > 0 ? Environment.ProcessorCount : 1;
await Storage.Initialize(threads);
+ MAACStorage.Initialize();
var mainWindow = new MainWindow();
Current.MainWindow = mainWindow;
mainWindow.Show();
diff --git a/src/NebulaAuth/Converters/BoolToValueConverter.cs b/src/NebulaAuth/Converters/BoolToValueConverter.cs
new file mode 100644
index 0000000..3a31d79
--- /dev/null
+++ b/src/NebulaAuth/Converters/BoolToValueConverter.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Globalization;
+using System.Windows.Data;
+
+namespace NebulaAuth.Converters;
+
+public class BoolToValueConverter : IValueConverter
+{
+ public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
+ {
+ if (value is not bool b) return Binding.DoNothing;
+ if (parameter is Array)
+ {
+ var arr = (Array)parameter;
+ if (arr.Length == 0) return Binding.DoNothing;
+ var first = arr.GetValue(0);
+ var second = arr.Length > 1 ? arr.GetValue(1) : null;
+ return b ? first : second;
+ }
+
+ return b ? parameter : null;
+ }
+
+ public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+}
\ No newline at end of file
diff --git a/src/NebulaAuth/Converters/Converters.xaml b/src/NebulaAuth/Converters/Converters.xaml
index 5eaeb62..60d8388 100644
--- a/src/NebulaAuth/Converters/Converters.xaml
+++ b/src/NebulaAuth/Converters/Converters.xaml
@@ -14,7 +14,7 @@
-
+
diff --git a/src/NebulaAuth/Core/DialogsController.cs b/src/NebulaAuth/Core/DialogsController.cs
index a679800..8888b73 100644
--- a/src/NebulaAuth/Core/DialogsController.cs
+++ b/src/NebulaAuth/Core/DialogsController.cs
@@ -121,4 +121,14 @@ public static class DialogsController
vm?.Dispose();
}
}
+
+ public static async Task ShowSetAccountsPasswordDialog()
+ {
+ var vm = new SetAccountPasswordsVM();
+ var dialog = new SetAccountPasswordsView
+ {
+ DataContext = vm
+ };
+ await DialogHost.Show(dialog);
+ }
}
\ No newline at end of file
diff --git a/src/NebulaAuth/MainWindow.xaml b/src/NebulaAuth/MainWindow.xaml
index caaedcb..99e3acb 100644
--- a/src/NebulaAuth/MainWindow.xaml
+++ b/src/NebulaAuth/MainWindow.xaml
@@ -85,8 +85,17 @@
+
+
+