immich/mobile/lib/providers/infrastructure
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
..
asset_viewer chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
action.provider.dart feat: drift edit time and date action (#20377) 2025-07-30 14:40:13 -05:00
album.provider.dart fix: skip albums selected or excluded from backups from deletions (#21116) 2025-08-21 13:44:07 -05:00
asset.provider.dart feat(mobile): drift place page (#19914) 2025-07-15 15:10:12 +00:00
cancel.provider.dart feat: user sync stream (#16862) 2025-04-17 10:25:27 -05:00
current_album.provider.dart fix: don't show remove from album action from the main timeline (#20757) 2025-08-07 23:36:16 +05:30
db.provider.dart feat: migrate store to sqlite (#21078) 2025-08-21 14:58:50 -05:00
db.provider.g.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
device_asset.provider.dart refactor(mobile): interfaces refactor (#19415) 2025-06-23 11:27:44 -05:00
exif.provider.dart chore: bump line length to 120 (#20191) 2025-07-25 02:37:22 +00:00
exif.provider.g.dart refactor(mobile): interfaces refactor (#19415) 2025-06-23 11:27:44 -05:00
map.provider.dart refactor(mobile): sqlite-based map view (#20665) 2025-08-06 10:05:49 -05:00
memory.provider.dart fix(mobile): memory lane rebuild (#21350) 2025-08-27 21:16:41 -05:00
partner.provider.dart chore: bump line length to 120 (#20191) 2025-07-25 02:37:22 +00:00
people.provider.dart feat: people page/sheet/detail (#20309) 2025-07-30 03:07:53 +00:00
platform.provider.dart feat(mobile): platform image providers (#20927) 2025-08-20 19:36:44 +00:00
readonly_mode.provider.dart feat(mobile): add read only mode (#19368) 2025-08-28 17:30:15 +00:00
remote_album.provider.dart fix(mobile): newest/oldest album sort (#20743) 2025-08-12 14:46:50 -05:00
search.provider.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
setting.provider.dart chore: bump line length to 120 (#20191) 2025-07-25 02:37:22 +00:00
stack.provider.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
storage.provider.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
store.provider.dart chore: bump line length to 120 (#20191) 2025-07-25 02:37:22 +00:00
store.provider.g.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
sync.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
user.provider.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
user.provider.g.dart chore: bump dart sdk to 3.8 (#20355) 2025-07-28 14:04:03 -05:00
user_metadata.provider.dart feat(mobile): drift user metadata sync (#19894) 2025-07-15 09:17:35 -05:00