immich/mobile/lib/providers
Sudheer Reddy Puthana 8853079c54
feat(mobile): add read only mode (#19368)
* feat(mobile): Add Kid (Readonly) Mode toggle

This commit introduces a "Kid (Readonly) Mode" feature.

- Adds a `KidModeProvider` to manage the state of Kid Mode.
- Implements a `KidModeCheckbox` widget in the app bar dialog to toggle Kid Mode.
- When Kid Mode is enabled,
  - Disables selecting the multigrid & the bottom bar
  - Removes the top bar from view

Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>

Reverts the changes to devtools_options.yaml file

Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>

refactor: replace Kid Mode with Readonly Mode

This commit replaces the "Kid Mode" feature with a more generic "Readonly Mode".

- Renamed `KidModeProvider` to `ReadonlyModeProvider`.
- Readonly Mode state is now persisted in app settings.
- Added a new app setting `allowUserAvatarOverride` to toggle read-only mode.
- Updated translations.
- Added a message in the app bar dialog indicating when read-only mode is active.

Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>

Address comments -

- Removes the `allowUserAvatarOverride` setting.
- Hides the bottom gallery bar when read-only mode is enabled.
- Adds an icon on the main app bar when read-only mode is enabled with a snackbar.

Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>

Update to snackbar

- When toggling readonly mode from either the settings or the app bar, a snackbar notification will now appear.
- The readonly mode message in the profile drawer has been restyled.
- The upload button in the app bar is now hidden when readonly mode is enabled.

Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>

Removes clearing of snackbar

Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>

Address Comments

- Consolidated snackbar messages for enabling/disabling readonly mode.
- Ensured the "Select All" icon in asset group titles is hidden in readonly mode.

Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>

Adds in the missing translation keys for readonly_mode

Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>

Fix translation

Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>

Fix check failure for BorderRadius

Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>

Changes:
- Adjusted AppBar background color in readonly mode.
- Removes cross-out pencil icon button in favor of above.
- Hides the "Edit" icon next to date/time, disable description and onTap for people and location when readonly mode is enabled.

Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>

Address comments from Alex

- Moved readonly mode check to `GalleryAppBar` to hide the entire `TopControlAppBar` when readonly mode is enabled.
- Changed `toggleReadonlyMode` in `ImmichAppBar` to directly toggle the state.

Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>

migrate readonly mode to new beta timeline

remove readonly mode from legacy UI

only show readonly functionality when on beta timeline

simplify selection icon

update generated provider

chore: more formatting

* fix: bad merge

* chore: use Notifier for readonlyModeProvider

* fix: drag select now honors readonly mode

* fix: disable asset bottom sheet in readonly

* fix: disable editing user icon when in readonly

* chore: remove generated file

* fix: disable tabs instead entire tab bar

This solves the issues with the scrubber

* chore: remove unneeded import

* chore: lint

* remove unused condition in bottomsheet

---------

Co-authored-by: Brandon Wees <brandonwees@gmail.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-08-28 17:30:15 +00:00
..
album chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
asset_viewer chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
backup feat: beta background sync (#21243) 2025-08-28 14:11:54 +00:00
image fix(mobile): caching thumbnails to disk (#21275) 2025-08-26 11:49:12 -04:00
infrastructure feat(mobile): add read only mode (#19368) 2025-08-28 17:30:15 +00:00
map chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
search chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
timeline fix: hide navigation bar in search page during multi-selection (#20616) 2025-08-04 12:39:40 -05:00
activity.provider.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
activity.provider.g.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
activity_service.provider.dart chore: bump line length to 120 (#20191) 2025-07-25 02:37:22 +00:00
activity_service.provider.g.dart chore(mobile): generated files and ci check (#16798) 2025-03-11 12:22:31 +00:00
activity_statistics.provider.dart chore: bump line length to 120 (#20191) 2025-07-25 02:37:22 +00:00
activity_statistics.provider.g.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
api.provider.dart feat(mobile): enabled DCM (#17957) 2025-06-09 11:09:02 -05:00
api.provider.g.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
app_life_cycle.provider.dart fix: improvements to sync and upload when resuming app (#20524) 2025-08-05 03:11:44 +05:30
app_settings.provider.dart refactor: DCM - const border radius, constructor & switch expressions (#19515) 2025-06-25 13:06:24 +05:30
app_settings.provider.g.dart refactor: DCM - const border radius, constructor & switch expressions (#19515) 2025-06-25 13:06:24 +05:30
asset.provider.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
auth.provider.dart fix: empty custom header prevent logging in (#20693) 2025-08-05 16:14:21 +00:00
background_sync.provider.dart feat(mobile): beta sync stats page (#19950) 2025-07-22 16:24:32 +00:00
cast.provider.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
db.provider.dart refactor(mobile): services and providers (#9232) 2024-05-02 15:59:14 -05:00
folder.provider.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
gallery_permission.provider.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
haptic_feedback.provider.dart chore: bump line length to 120 (#20191) 2025-07-25 02:37:22 +00:00
immich_logo_provider.dart feat(mobile): enabled DCM (#17957) 2025-06-09 11:09:02 -05:00
immich_logo_provider.g.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
local_auth.provider.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
locale_provider.dart feat(mobile): exclude locales from overpass font (#14158) 2024-11-19 09:36:46 -06:00
memory.provider.dart chore: bump line length to 120 (#20191) 2025-07-25 02:37:22 +00:00
multiselect.provider.dart refactor(mobile): services and providers (#9232) 2024-05-02 15:59:14 -05:00
network.provider.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
notification_permission.provider.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
oauth.provider.dart chore: bump line length to 120 (#20191) 2025-07-25 02:37:22 +00:00
partner.provider.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
routes.provider.dart feat: people page/sheet/detail (#20309) 2025-07-30 03:07:53 +00:00
secure_storage.provider.dart chore: bump line length to 120 (#20191) 2025-07-25 02:37:22 +00:00
server_info.provider.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
shared_link.provider.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
sync_status.provider.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
tab.provider.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
theme.provider.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
timeline.provider.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
trash.provider.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
upload_profile_image.provider.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
user.provider.dart chore: bump line length to 120 (#20191) 2025-07-25 02:37:22 +00:00
websocket.provider.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00