naiji-dev #91

Merged
inex merged 6 commits from naiji-dev into develop 2022-06-23 12:12:38 +03:00
Collaborator
  • Fixed routing errors and broken "back" buttons on recovery stages
  • Fixed broken validation on api token fields
  • Minor improvements
- Fixed routing errors and broken "back" buttons on recovery stages - Fixed broken validation on api token fields - Minor improvements
NaiJi added the
Bug
label 2022-06-15 06:32:00 +03:00
inex was assigned by NaiJi 2022-06-15 06:32:00 +03:00
NaiJi added 75 commits 2022-06-15 06:32:01 +03:00
4c99579f13 Fix username validation and exception handling
1. Refactor string validation classes
2. Rename string validation assets for length
3. Improve exception handling when server is not able to create requested server
4c7cf05578 Refactor FieldCubit creation for user forms
Move all cubit fields to a special factory which encapsulates all logic related to their default properties, which leaves possibility for future dependency inversion on that factory or future factories of other cubit fields (in case we will have to replace it with other implementations).
31be961dd0 Implement server endpoints for tokens
get /auth/recovery_token
post /auth/recovery_token
post /auth/recovery_token/use
post /auth/new_device/authorize
post /auth/new_device
delete /auth/new_device
get /auth/tokens
post /auth/tokens
delete /auth/tokens
ce3e046f5a Improve server endpoints, add recovery page
- Handle Dio error codes properly to avoid exceptions
- Improve en and ru assets
- Improve dns recordings failure handling
- Add recovery button to initializing page
- Add recovery pages group
4a42733d31 Refactor infrastructure: cubits and endpoints
Co-authored-by: Inex Code <inex.code@selfprivacy.org>
129c1bb4c6 Refactor infrastructure
Co-authored-by: Inex Code <inex.code@selfprivacy.org>
8b5bf24f3a Merge branch 'dynamic-theming' into flutter-3
# Conflicts:
#	lib/main.dart
#	pubspec.lock
#	pubspec.yaml
10488d6832 Fix application failure on cloudflare 403 response
Check error response and show modal dialogue if domain couldn't be registered
ee53590ba0 Implement recovery method select page
Co-authored-by: Inex Code <inex.code@selfprivacy.org>
7a719f15ce Implement first recovery device method page
Co-authored-by: Inex Code <inex.code@selfprivacy.org>
93215d90fb Implement fallback recovery method page
Co-authored-by: Inex Code <inex.code@selfprivacy.org>
0d0a3a4fee Refactor App Config Cubit infrastrucute
Co-authored-by: Inex Code <inex.code@selfprivacy.org>
19bc780db1 Implement async validation of domain field on recovering access
Co-authored-by: Inex Code <inex.code@selfprivacy.org>
bf79fb1adf - Refactor Hive boxes
- Delete SSH generation leftovers
- Migrate users box to an encrypted box
2d96b4505e Disable unavailable functionality when server is not created
- Remove create and upgrade server jobs when server is not there
- Disable root SSH panel page when server is not there
6fd7f9400d Implement recovery by old token pages with mock .md
Co-authored-by: Inex Code <inex.code@selfprivacy.org>
eaa1ba143c Implement pages for server confirmation on restoring access
Co-authored-by: Inex Code <inex.code@selfprivacy.org>
eddeac57d6 Implement server selection pages
Co-authored-by: Inex Code <inex.code@selfprivacy.org>
edce25ec55 Hot bug fixing of recovery flow
Co-authored-by: Inex Code <inex.code@selfprivacy.org>
5dcaa060a1 Linting
Co-authored-by: Inex Code <inex.code@selfprivacy.org>
72ef16c6f6 Implement recovery key pages and device cubit
Co-authored-by: Inex Code <inex.code@selfprivacy.org>
ead19d2210 Finish recovery key workflow and pages
Co-authored-by: Inex Code <inex.code@selfprivacy.org>
1db8e9556e Fix UI colors and such :)
Co-authored-by: Inex Code <inex.code@selfprivacy.org>
2ac8e4366b Linting!
Co-authored-by: Inex Code <inex.code@selfprivacy.org>
80e0488700 Minor bug fixing
Co-authored-by: Inex Code <inex.code@selfprivacy.org>
ad53000415 Add recovery manuals
Co-authored-by: Inex Code <inex.code@selfprivacy.org>
NaiJi requested review from inex 2022-06-15 06:32:38 +03:00
NaiJi closed this pull request 2022-06-15 06:33:42 +03:00
NaiJi reopened this pull request 2022-06-15 06:34:54 +03:00
NaiJi added 1 commit 2022-06-15 07:07:09 +03:00
inex requested changes 2022-06-15 07:18:35 +03:00
@ -411,6 +411,7 @@ class ServerInstallationCubit extends Cubit<ServerInstallationState> {
case RecoveryStep.recoveryKey:
case RecoveryStep.newDeviceKey:
case RecoveryStep.oldToken:
case RecoveryStep.hetznerToken:

If we are on hetznerToken stage, we already have a token. Getting back was disabled on purpose.

If we are on hetznerToken stage, we already have a token. Getting back was disabled on purpose.
@ -426,2 +427,4 @@
);
break;
case RecoveryStep.cloudflareToken:
repository.deleteDomain();

These deletions will likely break app state on app restart.

These deletions will likely break app state on app restart.
@ -428,0 +431,4 @@
repository.deleteServerDetails();
emit(
dataState.copyWith(
currentStep: RecoveryStep.serverSelection,

Consider adding back button handling from serverSelection screen, then. Instead of hetznerToken above.

Consider adding back button handling from serverSelection screen, then. Instead of hetznerToken above.
@ -428,0 +436,4 @@
);
break;
case RecoveryStep.backblazeToken:
repository.deleteBackblazeKey();

Furthermore, these calls to repository have no sense at all.

  • You are trying to delete domain data before it is saved.
  • You are deleting backblaze key when there is none yet.
  • Deleting server data on previous case block will break recovery flow on app restart.
Furthermore, these calls to repository have no sense at all. - You are trying to delete domain data *before* it is saved. - You are deleting backblaze key when there is none yet. - Deleting server data on previous case block will break recovery flow on app restart.
@ -32,6 +32,8 @@ class RecoveryHetznerConnected extends StatelessWidget {
),
hasBackButton: true,
hasFlashButton: false,
onBackButtonPressed:

App already authorized on the server successfully, no sense in going back at this point.

App already authorized on the server *successfully*, no sense in going back at this point.
NaiJi requested review from inex 2022-06-15 07:57:08 +03:00
NaiJi force-pushed naiji-dev from 2c24be6330 to 0feb9bc299 2022-06-15 07:58:13 +03:00 Compare
inex added 1 commit 2022-06-23 12:12:01 +03:00
inex merged commit c4f62e012b into develop 2022-06-23 12:12:38 +03:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: SelfPrivacy/selfprivacy.org.app#91
There is no content yet.