mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-23 17:26:35 +00:00
fix: Improve installation failure dialogues
This commit is contained in:
parent
da4b38b787
commit
0d55361a9b
|
@ -262,7 +262,7 @@ class ServerInstallationCubit extends Cubit<ServerInstallationState> {
|
||||||
if (!result.success && result.data != null) {
|
if (!result.success && result.data != null) {
|
||||||
bool dialoguesResolved = false;
|
bool dialoguesResolved = false;
|
||||||
CallbackDialogueBranching branching = result.data!;
|
CallbackDialogueBranching branching = result.data!;
|
||||||
while (!dialoguesResolved) {
|
//while (!dialoguesResolved) {
|
||||||
showPopUpAlert(
|
showPopUpAlert(
|
||||||
alertTitle: branching.title,
|
alertTitle: branching.title,
|
||||||
description: branching.description,
|
description: branching.description,
|
||||||
|
@ -287,7 +287,7 @@ class ServerInstallationCubit extends Cubit<ServerInstallationState> {
|
||||||
branching = branchingResult.data!;
|
branching = branchingResult.data!;
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -159,10 +159,10 @@ class DigitalOceanServerProvider extends ServerProvider {
|
||||||
choices: [
|
choices: [
|
||||||
CallbackDialogueChoice(
|
CallbackDialogueChoice(
|
||||||
title: 'basis.cancel'.tr(),
|
title: 'basis.cancel'.tr(),
|
||||||
callback: await installationData.errorCallback(),
|
callback: () async => await installationData.errorCallback(),
|
||||||
),
|
),
|
||||||
CallbackDialogueChoice(
|
CallbackDialogueChoice(
|
||||||
title: 'basis.try_again'.tr(),
|
title: 'modals.try_again'.tr(),
|
||||||
callback: () async => launchInstallation(installationData),
|
callback: () async => launchInstallation(installationData),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -215,7 +215,7 @@ class DigitalOceanServerProvider extends ServerProvider {
|
||||||
callback: null,
|
callback: null,
|
||||||
),
|
),
|
||||||
CallbackDialogueChoice(
|
CallbackDialogueChoice(
|
||||||
title: 'basis.try_again'.tr(),
|
title: 'modals.try_again'.tr(),
|
||||||
callback: () async {
|
callback: () async {
|
||||||
await Future.delayed(const Duration(seconds: 5));
|
await Future.delayed(const Duration(seconds: 5));
|
||||||
final deletion = await deleteServer(hostname);
|
final deletion = await deleteServer(hostname);
|
||||||
|
@ -595,7 +595,7 @@ class DigitalOceanServerProvider extends ServerProvider {
|
||||||
callback: null,
|
callback: null,
|
||||||
),
|
),
|
||||||
CallbackDialogueChoice(
|
CallbackDialogueChoice(
|
||||||
title: 'basis.try_again'.tr(),
|
title: 'modals.try_again'.tr(),
|
||||||
callback: () async {
|
callback: () async {
|
||||||
await Future.delayed(const Duration(seconds: 5));
|
await Future.delayed(const Duration(seconds: 5));
|
||||||
return deleteServer(hostname);
|
return deleteServer(hostname);
|
||||||
|
|
|
@ -418,10 +418,10 @@ class HetznerServerProvider extends ServerProvider {
|
||||||
choices: [
|
choices: [
|
||||||
CallbackDialogueChoice(
|
CallbackDialogueChoice(
|
||||||
title: 'basis.cancel'.tr(),
|
title: 'basis.cancel'.tr(),
|
||||||
callback: await installationData.errorCallback(),
|
callback: () async => await installationData.errorCallback(),
|
||||||
),
|
),
|
||||||
CallbackDialogueChoice(
|
CallbackDialogueChoice(
|
||||||
title: 'basis.try_again'.tr(),
|
title: 'modals.try_again'.tr(),
|
||||||
callback: () async => launchInstallation(installationData),
|
callback: () async => launchInstallation(installationData),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -467,10 +467,10 @@ class HetznerServerProvider extends ServerProvider {
|
||||||
choices: [
|
choices: [
|
||||||
CallbackDialogueChoice(
|
CallbackDialogueChoice(
|
||||||
title: 'basis.cancel'.tr(),
|
title: 'basis.cancel'.tr(),
|
||||||
callback: installationData.errorCallback(),
|
callback: () async => installationData.errorCallback(),
|
||||||
),
|
),
|
||||||
CallbackDialogueChoice(
|
CallbackDialogueChoice(
|
||||||
title: 'basis.yes'.tr(),
|
title: 'modals.yes'.tr(),
|
||||||
callback: () async {
|
callback: () async {
|
||||||
final deleting = await deleteServer(hostname);
|
final deleting = await deleteServer(hostname);
|
||||||
if (deleting.success) {
|
if (deleting.success) {
|
||||||
|
@ -481,7 +481,7 @@ class HetznerServerProvider extends ServerProvider {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
description: volumeResult.message ?? 'modals.destroy_server'.tr(),
|
description: 'modals.destroy_server'.tr(),
|
||||||
title: 'modals.already_exists'.tr(),
|
title: 'modals.already_exists'.tr(),
|
||||||
),
|
),
|
||||||
success: false,
|
success: false,
|
||||||
|
@ -504,7 +504,7 @@ class HetznerServerProvider extends ServerProvider {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
CallbackDialogueChoice(
|
CallbackDialogueChoice(
|
||||||
title: 'basis.try_again'.tr(),
|
title: 'modals.try_again'.tr(),
|
||||||
callback: () async => launchInstallation(installationData),
|
callback: () async => launchInstallation(installationData),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -556,7 +556,7 @@ class HetznerServerProvider extends ServerProvider {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
CallbackDialogueChoice(
|
CallbackDialogueChoice(
|
||||||
title: 'basis.try_again'.tr(),
|
title: 'modals.try_again'.tr(),
|
||||||
callback: () async {
|
callback: () async {
|
||||||
await _adapter.api().deleteVolume(volume['id']);
|
await _adapter.api().deleteVolume(volume['id']);
|
||||||
await Future.delayed(const Duration(seconds: 5));
|
await Future.delayed(const Duration(seconds: 5));
|
||||||
|
@ -631,7 +631,7 @@ class HetznerServerProvider extends ServerProvider {
|
||||||
callback: null,
|
callback: null,
|
||||||
),
|
),
|
||||||
CallbackDialogueChoice(
|
CallbackDialogueChoice(
|
||||||
title: 'basis.try_again'.tr(),
|
title: 'modals.try_again'.tr(),
|
||||||
callback: () async {
|
callback: () async {
|
||||||
await Future.delayed(const Duration(seconds: 5));
|
await Future.delayed(const Duration(seconds: 5));
|
||||||
return deleteServer(hostname);
|
return deleteServer(hostname);
|
||||||
|
|
Loading…
Reference in a new issue