Vorbereitungen für 1.0.6

Beachte die Einstellung ob Projekte und Gemeinden aktiv sind.
Verbiete Änderungen an der Freistellung, wenn sie genehmigt wurde.
Vereinfache das Speichern der Einstellungen
Bessere Fehlerbehandlung, einheitlichere API
This commit is contained in:
2024-10-22 17:42:35 +02:00
parent ff145b2c7f
commit 45c53c85ce
11 changed files with 350 additions and 293 deletions

View File

@@ -0,0 +1,26 @@
using Jugenddienst_Stunden.Types;
namespace Jugenddienst_Stunden.Models;
internal static class GlobalVar {
public static string ApiKey {
get => Preferences.Default.Get("apiKey", "");
set => Preferences.Default.Set("apiKey", value);
}
public static int EmployeeId {
get => Preferences.Default.Get("EmployeeId", 0);
set => Preferences.Default.Set("EmployeeId", value);
}
public static string Name {
get => Preferences.Default.Get("name", "Nicht");
set => Preferences.Default.Set("name", value);
}
public static string Surname {
get => Preferences.Default.Get("surname", "Eingeloggt");
set => Preferences.Default.Set("surname", value);
}
public static string ApiUrl {
get => Preferences.Default.Get("apiUrl", "");
set => Preferences.Default.Set("apiUrl", value);
}
public static Settings Settings { get; set; }
}