Web - Add docker image and baseUrl config support (#32)

This commit is contained in:
PartyDonut 2024-10-17 19:06:13 +02:00 committed by GitHub
parent 80a0fdbee4
commit bfcbf5402d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 144 additions and 138 deletions

View file

@ -0,0 +1,17 @@
class FladderConfig {
static FladderConfig _instance = FladderConfig._();
FladderConfig._();
static String? get baseUrl => _instance._baseUrl;
static set baseUrl(String? value) => _instance._baseUrl = value;
String? _baseUrl;
static void fromJson(Map<String, dynamic> json) => _instance = FladderConfig._fromJson(json);
factory FladderConfig._fromJson(Map<String, dynamic> json) {
final config = FladderConfig._();
final newUrl = json['baseUrl'] as String?;
config._baseUrl = newUrl?.isEmpty == true ? null : newUrl;
return config;
}
}