Skip to content

Commit

Permalink
Merge pull request #51 from archethic-foundation/responsive
Browse files Browse the repository at this point in the history
Responsive
  • Loading branch information
redDwarf03 authored Oct 29, 2023
2 parents 56acac6 + 72dd985 commit a73ab17
Show file tree
Hide file tree
Showing 103 changed files with 5,339 additions and 5,726 deletions.
Binary file removed assets/fonts/Caveat-Regular.ttf
Binary file not shown.
Binary file removed assets/fonts/Equinox Bold.otf
Binary file not shown.
Binary file removed assets/fonts/Equinox Regular.otf
Binary file not shown.
Binary file removed assets/fonts/Lato-Bold.ttf
Binary file not shown.
Binary file removed assets/fonts/Lato-Italic.ttf
Binary file not shown.
Binary file removed assets/fonts/Lato-Regular.ttf
Binary file not shown.
Binary file added assets/fonts/PPTelegraf-Black.otf
Binary file not shown.
Binary file added assets/fonts/PPTelegraf-Bold.otf
Binary file not shown.
Binary file added assets/fonts/PPTelegraf-Light.otf
Binary file not shown.
Binary file added assets/fonts/PPTelegraf-Medium.otf
Binary file not shown.
Binary file added assets/fonts/PPTelegraf-Regular.otf
Binary file not shown.
Binary file added assets/fonts/PPTelegraf-Semibold.otf
Binary file not shown.
Binary file added assets/fonts/PPTelegraf-Ultrabold.otf
Binary file not shown.
Binary file added assets/fonts/PPTelegraf-Ultralight.otf
Binary file not shown.
Binary file added assets/images/AELogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/background-mainscreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/background-menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/background-sub-menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 0 additions & 20 deletions lib/application/main_screen_third_part.dart

This file was deleted.

29 changes: 0 additions & 29 deletions lib/application/selected_website.dart

This file was deleted.

3 changes: 1 addition & 2 deletions lib/application/session/provider.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// SPDX-License-Identifier: AGPL-3.0-or-later
import 'dart:async';
import 'dart:developer';
import 'package:aeweb/application/selected_website.dart';

import 'package:aeweb/application/session/state.dart';
import 'package:aeweb/domain/repositories/features_flags.dart';
import 'package:aeweb/model/hive/db_helper.dart';
Expand Down Expand Up @@ -147,7 +147,6 @@ class _SessionNotifier extends Notifier<Session> {
);
}),
);
ref.invalidate(SelectedWebsiteProviders.selectedWebsiteProvider);
},
failure: (failure) {
state = state.copyWith(
Expand Down
62 changes: 49 additions & 13 deletions lib/domain/usecases/website/add_website.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
import 'dart:async';
import 'dart:developer';

import 'package:aeweb/application/main_screen_third_part.dart';
import 'package:aeweb/application/selected_website.dart';
import 'package:aeweb/model/hive/db_helper.dart';
import 'package:aeweb/model/website.dart';
import 'package:aeweb/ui/views/add_website/bloc/provider.dart';
Expand Down Expand Up @@ -245,22 +243,60 @@ class AddWebsiteUseCases
if (ref.read(AddWebsiteFormProvider.addWebsiteForm).stepError.isEmpty) {
addWebsiteNotifier.setStep(13);
log('Website is deployed at : ${sl.get<ApiService>().endpoint}/api/web_hosting/$addressTxRef');
ref
.read(SelectedWebsiteProviders.selectedWebsiteProvider.notifier)
.setSelection(
addressTxRef,
ref.read(AddWebsiteFormProvider.addWebsiteForm).name,
);
ref
.read(
MainScreenThirdPartProviders.mainScreenThirdPartProvider.notifier,
)
.setWidget(const SizedBox());
}
} catch (e) {
addWebsiteNotifier
..setStep(14)
..setStepError(e.toString().replaceAll('Exception: ', '').trim());
}
}

String getConfirmLabel(
BuildContext context,
int step,
) {
switch (step) {
case 1:
case 4:
case 6:
case 9:
return AppLocalizations.of(context)!.pleaseConfirmWallet;
}
return '';
}

String getStepLabel(
BuildContext context,
int step,
) {
switch (step) {
case 1:
return AppLocalizations.of(context)!.addWebSiteWaitingStep1;
case 2:
return AppLocalizations.of(context)!.addWebSiteWaitingStep2;
case 3:
return AppLocalizations.of(context)!.addWebSiteWaitingStep3;
case 4:
return AppLocalizations.of(context)!.addWebSiteWaitingStep4;
case 5:
return AppLocalizations.of(context)!.addWebSiteWaitingStep5;
case 6:
return AppLocalizations.of(context)!.addWebSiteWaitingStep6;
case 7:
return AppLocalizations.of(context)!.addWebSiteWaitingStep7;
case 8:
return AppLocalizations.of(context)!.addWebSiteWaitingStep8;
case 9:
return AppLocalizations.of(context)!.addWebSiteWaitingStep9;
case 10:
return AppLocalizations.of(context)!.addWebSiteWaitingStep10;
// case 11 = user needs to validate
case 12:
return AppLocalizations.of(context)!.addWebSiteWaitingStep12;
case 13:
return AppLocalizations.of(context)!.addWebSiteWaitingStep13;
default:
return '';
}
}
}
41 changes: 41 additions & 0 deletions lib/domain/usecases/website/unpublish_website.dart
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,45 @@ class UnpublishWebsiteUseCases with TransactionAEWebMixin {
..setStepError(e.toString().replaceAll('Exception: ', '').trim());
}
}

String getStepLabel(
BuildContext context,
int step,
) {
switch (step) {
case 1:
return AppLocalizations.of(context)!.unpublishWebSiteWaitingStep1;
case 2:
return AppLocalizations.of(context)!.unpublishWebSiteWaitingStep2;
case 3:
return AppLocalizations.of(context)!.unpublishWebSiteWaitingStep3;
case 4:
return AppLocalizations.of(context)!.unpublishWebSiteWaitingStep4;
case 5:
return AppLocalizations.of(context)!.unpublishWebSiteWaitingStep5;
case 6:
return AppLocalizations.of(context)!.unpublishWebSiteWaitingStep6;
case 7:
return AppLocalizations.of(context)!.unpublishWebSiteWaitingStep7;
// case 8 = user needs to validate
case 9:
return AppLocalizations.of(context)!.unpublishWebSiteWaitingStep9;
case 10:
return AppLocalizations.of(context)!.unpublishWebSiteConfirmedStep10;
default:
return '';
}
}

String getConfirmLabel(
BuildContext context,
int step,
) {
switch (step) {
case 3:
case 6:
return AppLocalizations.of(context)!.pleaseConfirmWallet;
}
return '';
}
}
41 changes: 41 additions & 0 deletions lib/domain/usecases/website/update_certificate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,45 @@ class UpdateCertificateUseCases with TransactionAEWebMixin {
..setStepError(e.toString().replaceAll('Exception: ', '').trim());
}
}

String getStepLabel(
BuildContext context,
int step,
) {
switch (step) {
case 1:
return AppLocalizations.of(context)!.updateCertificateWaitingStep1;
case 2:
return AppLocalizations.of(context)!.updateCertificateWaitingStep2;
case 3:
return AppLocalizations.of(context)!.updateCertificateWaitingStep3;
case 4:
return AppLocalizations.of(context)!.updateCertificateWaitingStep4;
case 5:
return AppLocalizations.of(context)!.updateCertificateWaitingStep5;
case 6:
return AppLocalizations.of(context)!.updateCertificateWaitingStep6;
case 7:
return AppLocalizations.of(context)!.updateCertificateWaitingStep7;
// case 8 = user needs to validate
case 9:
return AppLocalizations.of(context)!.updateCertificateWaitingStep9;
case 10:
return AppLocalizations.of(context)!.updateCertificateConfirmedStep10;
default:
return '';
}
}

String getConfirmLabel(
BuildContext context,
int step,
) {
switch (step) {
case 3:
case 6:
return AppLocalizations.of(context)!.pleaseConfirmWallet;
}
return '';
}
}
48 changes: 48 additions & 0 deletions lib/domain/usecases/website/update_website_sync.dart
Original file line number Diff line number Diff line change
Expand Up @@ -328,4 +328,52 @@ class UpdateWebsiteSyncUseCases with FileMixin, TransactionAEWebMixin {
..setStepError(e.toString().replaceAll('Exception: ', '').trim());
}
}

String getStepLabel(
BuildContext context,
int step,
) {
switch (step) {
case 1:
return AppLocalizations.of(context)!.updateWebSiteWaitingStep1;
case 2:
return AppLocalizations.of(context)!.updateWebSiteWaitingStep2;
case 3:
return AppLocalizations.of(context)!.updateWebSiteWaitingStep3;
case 4:
return AppLocalizations.of(context)!.updateWebSiteWaitingStep4;
case 5:
return AppLocalizations.of(context)!.updateWebSiteWaitingStep5;
case 6:
return AppLocalizations.of(context)!.updateWebSiteWaitingStep6;
case 7:
return AppLocalizations.of(context)!.updateWebSiteWaitingStep7;
case 8:
return AppLocalizations.of(context)!.updateWebSiteWaitingStep8;
case 9:
return AppLocalizations.of(context)!.updateWebSiteWaitingStep9;
case 10:
return AppLocalizations.of(context)!.updateWebSiteWaitingStep10;
// case 11 = user needs to validate
case 12:
return AppLocalizations.of(context)!.updateWebSiteWaitingStep12;
case 13:
return AppLocalizations.of(context)!.updateWebSiteConfirmedStep13;
default:
return '';
}
}

String getConfirmLabel(
BuildContext context,
int step,
) {
switch (step) {
case 4:
case 6:
case 9:
return AppLocalizations.of(context)!.pleaseConfirmWallet;
}
return '';
}
}
Loading

0 comments on commit a73ab17

Please sign in to comment.