Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob] Add album join option for internal users

Neeraj42527c0cd5d8
diff --git a/mobile/apps/photos/lib/ui/sharing/manage_links_widget.dart b/mobile/apps/photos/lib/ui/sharing/manage_links_widget.dart
index d4d25ca67b..389733741c 100644
--- a/mobile/apps/photos/lib/ui/sharing/manage_links_widget.dart
+++ b/mobile/apps/photos/lib/ui/sharing/manage_links_widget.dart
@@ -53,6 +53,8 @@ class _ManageSharedLinkWidgetState extends State<ManageSharedLinkWidget> {
widget.collection!.publicURLs.firstOrNull?.enableDownload ?? true;
final isPasswordEnabled =
widget.collection!.publicURLs.firstOrNull?.passwordEnabled ?? false;
+ final isJoinEnabled =
+ widget.collection!.publicURLs.firstOrNull?.enableJoin ?? false;
final enteColorScheme = getEnteColorScheme(context);
final PublicURL url = widget.collection!.publicURLs.firstOrNull!;
final String urlValue =
@@ -94,6 +96,31 @@ class _ManageSharedLinkWidgetState extends State<ManageSharedLinkWidget> {
AppLocalizations.of(context).allowAddPhotosDescription,
),
const SizedBox(height: 24),
+ if (flagService.internalUser)
+ MenuItemWidget(
+ key: ValueKey("Allow join $isJoinEnabled"),
+ captionedTextWidget: const CaptionedTextWidget(
+ title: "Allow joining album (i)",
+ ),
+ alignCaptionedTextToLeft: true,
+ menuItemColor: getEnteColorScheme(context).fillFaint,
+ trailingWidget: ToggleSwitchWidget(
+ value: () => isJoinEnabled,
+ onChanged: () async {
+ await _updateUrlSettings(
+ context,
+ {'enableJoin': !isJoinEnabled},
+ );
+ },
+ ),
+ ),
+ if (flagService.internalUser)
+ MenuSectionDescriptionWidget(
+ content: isCollectEnabled
+ ? "Allow people with link to join your album as Collaborator"
+ : "Allow people with link to join your album as Viewer",
+ ),
+ if (flagService.internalUser) const SizedBox(height: 24),
MenuItemWidget(
alignCaptionedTextToLeft: true,
captionedTextWidget: CaptionedTextWidget(
diff --git a/mobile/apps/photos/scripts/internal_changes.txt b/mobile/apps/photos/scripts/internal_changes.txt
index 564ed6b727..c75a1c4b5b 100644
--- a/mobile/apps/photos/scripts/internal_changes.txt
+++ b/mobile/apps/photos/scripts/internal_changes.txt
@@ -2,4 +2,5 @@
- Laurens: text embedding caching for memories and discover
- Neeraj: (i) Option to send qr for link
- Neeraj: (i) Debug option to enable logViewer
-- Neeraj: Potential fix for ios in-app payment
\ No newline at end of file
+- Neeraj: Potential fix for ios in-app payment
+- Claude: (i) Add allow joining album option in manage links
\ No newline at end of file