-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[mob][locker] Allow account creation #8483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 41 commits
Commits
Show all changes
58 commits
Select commit
Hold shift + click to select a range
15727dc
[mob][auth] Pin shared packages to main SHA for locker refactoring
AmanRajSinghMourya 849273d
refactor: Remove unused LoginPage and update UI components for better…
AmanRajSinghMourya 69037e8
refactor: Update OTT verification page to use Pinput for code entry a…
AmanRajSinghMourya e1a6bf2
refactor: Simplify PasswordReentryPage UI and enhance theme integration
AmanRajSinghMourya 8c97933
refactor: Enhance RecoveryPage UI with improved theming and layout ad…
AmanRajSinghMourya fd853d1
refactor: Improve UI consistency and theming in password verification…
AmanRajSinghMourya 4505fb9
refactor: Update OnboardingPage to enhance sign-up navigation and UI …
AmanRajSinghMourya 77c8fde
refactor: Enhance EmailEntryPage and TwoFactorAuthenticationPage UI w…
AmanRajSinghMourya f98c385
refactor: Enhance TwoFactorRecoveryPage UI with improved theming and …
AmanRajSinghMourya bb8d9f5
minor changes
AmanRajSinghMourya 470d111
refactor: Update RecoveryKeyPage UI with improved layout and theming …
AmanRajSinghMourya 4aefeb3
Minor UI fixes
AmanRajSinghMourya 266bc0e
refactor: Simplify UI code in EmailEntryPage for improved readability…
AmanRajSinghMourya be61383
refactor: Enhance UI in multiple pages with improved layouts and Dots…
AmanRajSinghMourya 78cd3d9
minor fix
AmanRajSinghMourya 1789355
refactor: Update RecoveryPage to allow more lines in recovery key inp…
AmanRajSinghMourya 7fd55bd
refactor: Enhance password verification page with contextual prompt f…
AmanRajSinghMourya b589a2c
minor change
AmanRajSinghMourya 32360a4
Merge branch 'main' into login
AmanRajSinghMourya d72cf05
refactor: remove unused alert bottom sheet and button components from…
AmanRajSinghMourya c3e3274
refactor: replace error dialogs with alert bottom sheets
AmanRajSinghMourya 5347443
refactor: replace error dialogs with alert bottom sheets in recovery …
AmanRajSinghMourya ae84e84
Extract strings
AmanRajSinghMourya d255f57
refactor: improve lifecycle management and error handling in user ser…
AmanRajSinghMourya 54ead69
Minor changes
AmanRajSinghMourya 2305e13
refactor: update padding and improve layout in two factor recovery page
AmanRajSinghMourya 9fe38ff
feat: add dots_indicator package with version 3.1.0 to pubspec.lock f…
AmanRajSinghMourya fcddccd
refactor: replace showErrorDialog with showAlertBottomSheet for impro…
AmanRajSinghMourya 62e1ef0
minor changes
AmanRajSinghMourya 959d8ed
refactor: replace showAlertBottomSheet with _showContactSupportDialog
AmanRajSinghMourya 47df15e
refactor: replace shareDialog with showShareSheet for improved sharin…
AmanRajSinghMourya 0206623
refactor: update UI components for Passkey and Two-Factor Recovery pa…
AmanRajSinghMourya 6a24eab
refactor: replace showErrorDialog with showAlertBottomSheet for impro…
AmanRajSinghMourya f63d756
refactor: remove ChangeEmailDialogLocker and integrate ChangeEmailDia…
AmanRajSinghMourya a31bdf9
refactor: replace showChoiceActionSheet with showAlertBottomSheet for…
AmanRajSinghMourya 2ccd263
refactor: update logout confirmation logic to prevent accidental sign…
AmanRajSinghMourya 3cc4f85
minor fix
AmanRajSinghMourya 1fcfe56
show change password option in settings
AmanRajSinghMourya ef7a047
Merge branch 'main' into login
AmanRajSinghMourya 7da2a94
chore: update SDWebImage to version 5.21.5 and remove unused script p…
AmanRajSinghMourya d73808b
refactor: enhance alert bottom sheet to support dismissible and close…
AmanRajSinghMourya c31f435
refactor: remove redundant 401 handling from trash service
AmanRajSinghMourya 8dc78b7
refactor: update package paths to use git source and remove pubspec_o…
AmanRajSinghMourya 2738161
Unpin auth packages
AmanRajSinghMourya 436d81b
Add new assets
AmanRajSinghMourya ddcfa7a
rename auth logo and fix naming
AmanRajSinghMourya a36ba20
minor fix
AmanRajSinghMourya 9efc335
feat: replace locker logo with SVG app logo across multiple pages
AmanRajSinghMourya 51a0d5c
added more icons
AmanRajSinghMourya 67f0b8f
chore: remove unused locker logo and pin assets
AmanRajSinghMourya e6e1606
refactor: remove LockScreenConfig usage and update UI components to u…
AmanRajSinghMourya 851f836
feat: add flutter_svg dependency to accounts and lock_screen packages
AmanRajSinghMourya 16aad0c
minor fix
AmanRajSinghMourya d0fdd44
chore: update version to 4.4.16+672 in pubspec.yaml
AmanRajSinghMourya a0bb1d0
[mob][packages] Refractor packages/account for auth (#8644)
AmanRajSinghMourya 1a4eda5
refactor: remove fixed height from app-logo SVG assets
AmanRajSinghMourya bf73509
feat: add SVG assets directory to flutter assets
AmanRajSinghMourya c266e80
feat: enhance logout functionality with null check and close button
AmanRajSinghMourya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,9 @@ import 'package:dio/dio.dart'; | |
| import 'package:ente_crypto_dart/ente_crypto_dart.dart'; | ||
| import "package:ente_events/event_bus.dart"; | ||
| import "package:ente_events/models/signed_in_event.dart"; | ||
| import "package:ente_events/models/trigger_logout_event.dart"; | ||
| import 'package:ente_network/network.dart'; | ||
| import "package:locker/core/errors.dart"; | ||
| import "package:locker/events/collections_updated_event.dart"; | ||
| import "package:locker/events/user_details_refresh_event.dart"; | ||
| import 'package:locker/services/collections/collections_db.dart'; | ||
|
|
@@ -192,6 +194,14 @@ class TrashService { | |
| hasMore, | ||
| latestUpdatedAtTime, | ||
| ); | ||
| } on DioException catch (e, s) { | ||
| _logger.severe(e, s); | ||
| if (e.response?.statusCode == 401) { | ||
| _logger.info("Session expired in trash sync, triggering logout"); | ||
| Bus.instance.fire(TriggerLogoutEvent()); | ||
| throw UnauthorizedError(); | ||
| } | ||
| rethrow; | ||
|
||
| } catch (e, s) { | ||
| _logger.severe(e, s); | ||
| rethrow; | ||
|
|
@@ -213,6 +223,14 @@ class TrashService { | |
| await _trashDB.delete(uniqueFileIds); | ||
|
|
||
| await _collectionDB.deleteFilesByUploadedFileIDs(uniqueFileIds); | ||
| } on DioException catch (e, s) { | ||
| _logger.severe("failed to delete from trash", e, s); | ||
| if (e.response?.statusCode == 401) { | ||
| _logger.info("Session expired in delete from trash, triggering logout"); | ||
| Bus.instance.fire(TriggerLogoutEvent()); | ||
| throw UnauthorizedError(); | ||
| } | ||
| rethrow; | ||
| } catch (e, s) { | ||
| _logger.severe("failed to delete from trash", e, s); | ||
| rethrow; | ||
|
|
@@ -237,6 +255,20 @@ class TrashService { | |
| await _trashDB.clearTable(); | ||
| await _collectionDB.deleteFilesByUploadedFileIDs(fileIDs); | ||
| unawaited(syncTrash()); | ||
| _logger.info("Successfully emptied trash"); | ||
| } on DioException catch (e, s) { | ||
| _logger.severe( | ||
| "failed to empty trash - status: ${e.response?.statusCode}, " | ||
| "data: ${e.response?.data}", | ||
| e, | ||
| s, | ||
| ); | ||
| if (e.response?.statusCode == 401) { | ||
| _logger.info("Session expired in empty trash, triggering logout"); | ||
| Bus.instance.fire(TriggerLogoutEvent()); | ||
| throw UnauthorizedError(); | ||
| } | ||
| rethrow; | ||
| } catch (e, s) { | ||
| _logger.severe("failed to empty trash", e, s); | ||
| rethrow; | ||
|
|
@@ -274,6 +306,14 @@ class TrashService { | |
| await CollectionService.instance.sync(); | ||
| Bus.instance.fire(CollectionsUpdatedEvent("file_restore")); | ||
| Bus.instance.fire(UserDetailsRefreshEvent()); | ||
| } on DioException catch (e, s) { | ||
| _logger.severe("failed to restore files", e, s); | ||
| if (e.response?.statusCode == 401) { | ||
| _logger.info("Session expired in restore files, triggering logout"); | ||
| Bus.instance.fire(TriggerLogoutEvent()); | ||
| throw UnauthorizedError(); | ||
| } | ||
| rethrow; | ||
| } catch (e, s) { | ||
| _logger.severe("failed to restore files", e, s); | ||
| rethrow; | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why we are adding dependency on commit ? it will close clone the whole repo for building.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done to avoid breaking for auth as the redesign is done on the
packages/accountwhich is used for auth as well. So I pinned these packages to mainUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like bad design as it breaks the primary purpose of having common packages. It completely defeats the purpose of having common packages.
Let's discuss this in person