Compare commits
3 Commits
11d0e58334
...
3181098152
Author | SHA1 | Date |
---|---|---|
Inex Code | 3181098152 | |
Inex Code | 16d1c8a918 | |
Inex Code | 81f4f93d7c |
|
@ -40,3 +40,9 @@ app.*.symbols
|
|||
|
||||
# Obfuscation related
|
||||
app.*.map.json
|
||||
|
||||
# Flatpak
|
||||
.flatpak-builder/
|
||||
flatpak-build/
|
||||
flatpak-repo/
|
||||
*.flatpak
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
app-id: org.selfprivacy.app
|
||||
runtime: org.freedesktop.Platform
|
||||
runtime-version: '22.08'
|
||||
runtime-version: '23.08'
|
||||
sdk: org.freedesktop.Sdk
|
||||
command: selfprivacy
|
||||
finish-args:
|
||||
|
@ -11,6 +11,7 @@ finish-args:
|
|||
- "--share=network"
|
||||
- "--own-name=org.selfprivacy.app"
|
||||
- "--device=dri"
|
||||
- "--talk-name=org.freedesktop.secrets"
|
||||
modules:
|
||||
- name: selfprivacy
|
||||
buildsystem: simple
|
||||
|
@ -35,7 +36,7 @@ modules:
|
|||
sources:
|
||||
- type: git
|
||||
url: https://gitlab.gnome.org/GNOME/libsecret.git
|
||||
tag: 0.20.5
|
||||
tag: 0.21.4
|
||||
- name: libjsoncpp
|
||||
buildsystem: meson
|
||||
config-opts:
|
||||
|
|
|
@ -32,16 +32,6 @@ class HiveConfig {
|
|||
await getEncryptedKey(BNames.serverInstallationEncryptionKey),
|
||||
);
|
||||
|
||||
await Hive.openBox<User>(BNames.usersDeprecated);
|
||||
await Hive.openBox<User>(BNames.usersBox, encryptionCipher: cipher);
|
||||
|
||||
final Box<User> deprecatedUsers = Hive.box<User>(BNames.usersDeprecated);
|
||||
if (deprecatedUsers.isNotEmpty) {
|
||||
final Box<User> users = Hive.box<User>(BNames.usersBox);
|
||||
await users.addAll(deprecatedUsers.values.toList());
|
||||
await deprecatedUsers.clear();
|
||||
}
|
||||
|
||||
await Hive.openBox(BNames.serverInstallationBox, encryptionCipher: cipher);
|
||||
}
|
||||
|
||||
|
@ -72,7 +62,7 @@ class BNames {
|
|||
/// A boolean field of [appSettingsBox] box.
|
||||
static String isOnboardingShowing = 'isOnboardingShowing';
|
||||
|
||||
/// Encryption key to decrypt [serverInstallationBox] and [usersBox] box.
|
||||
/// Encryption key to decrypt [serverInstallationBox] box.
|
||||
static String serverInstallationEncryptionKey = 'key';
|
||||
|
||||
/// Server installation box. Contains server details and provider tokens.
|
||||
|
@ -131,10 +121,4 @@ class BNames {
|
|||
|
||||
/// A boolean field of [serverInstallationBox] box.
|
||||
static String isRecoveringServer = 'isRecoveringServer';
|
||||
|
||||
/// Deprecated users box as it is unencrypted
|
||||
static String usersDeprecated = 'users';
|
||||
|
||||
/// Box with users
|
||||
static String usersBox = 'usersEncrypted';
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@ class ServerAuthorizationException implements Exception {
|
|||
|
||||
class ServerInstallationRepository {
|
||||
Box box = Hive.box(BNames.serverInstallationBox);
|
||||
Box<User> usersBox = Hive.box(BNames.usersBox);
|
||||
|
||||
Future<ServerInstallationState> load() async {
|
||||
final String? providerApiToken = getIt<ApiConfigModel>().serverProviderKey;
|
||||
|
@ -177,7 +176,6 @@ class ServerInstallationRepository {
|
|||
|
||||
void clearAppConfig() {
|
||||
box.clear();
|
||||
usersBox.clear();
|
||||
}
|
||||
|
||||
Future<ServerHostingDetails> startServer(
|
||||
|
|
|
@ -49,11 +49,11 @@ abstract class ServerInstallationState extends Equatable {
|
|||
bool get isPrimaryUserFilled => rootUser != null;
|
||||
bool get isServerCreated => serverDetails != null;
|
||||
|
||||
bool get isFullyInitilized => _fulfilementList.every((final el) => el!);
|
||||
bool get isFullyInitialized => _fulfillmentList.every((final el) => el!);
|
||||
ServerSetupProgress get progress => ServerSetupProgress
|
||||
.values[_fulfilementList.where((final el) => el!).length];
|
||||
.values[_fulfillmentList.where((final el) => el!).length];
|
||||
|
||||
int get porgressBar {
|
||||
int get progressBar {
|
||||
if (progress.index < 6) {
|
||||
return progress.index;
|
||||
} else if (progress.index < 10) {
|
||||
|
@ -63,7 +63,7 @@ abstract class ServerInstallationState extends Equatable {
|
|||
}
|
||||
}
|
||||
|
||||
List<bool?> get _fulfilementList {
|
||||
List<bool?> get _fulfillmentList {
|
||||
final List<bool> res = [
|
||||
isServerProviderApiKeyFilled,
|
||||
isServerTypeFilled,
|
||||
|
@ -118,7 +118,7 @@ class TimerState extends ServerInstallationNotFinished {
|
|||
enum ServerSetupProgress {
|
||||
nothingYet,
|
||||
serverProviderFilled,
|
||||
servertTypeFilled,
|
||||
serverTypeFilled,
|
||||
dnsProviderFilled,
|
||||
backblazeFilled,
|
||||
domainFilled,
|
||||
|
|
|
@ -11,7 +11,7 @@ class Price {
|
|||
enum CurrencyType {
|
||||
eur,
|
||||
usd,
|
||||
unkown,
|
||||
unknown,
|
||||
}
|
||||
|
||||
class Currency {
|
||||
|
|
|
@ -112,7 +112,7 @@ class InitializingPage extends StatelessWidget {
|
|||
'Server',
|
||||
'Installation',
|
||||
],
|
||||
activeIndex: cubit.state.porgressBar,
|
||||
activeIndex: cubit.state.progressBar,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue