Skip to content

armgit / ente

Public Imported from GitHub
0

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

Limit sharing to viewer

AmanRajSinghMourya4346746d89c4
diff --git a/mobile/apps/locker/lib/ui/components/file_list_widget.dart b/mobile/apps/locker/lib/ui/components/file_list_widget.dart
index 94f547df0a..8bc03f7bf9 100644
--- a/mobile/apps/locker/lib/ui/components/file_list_widget.dart
+++ b/mobile/apps/locker/lib/ui/components/file_list_widget.dart
@@ -3,6 +3,7 @@ import "package:ente_ui/theme/ente_theme.dart";
import "package:flutter/material.dart";
import "package:hugeicons/hugeicons.dart";
import "package:locker/models/selected_files.dart";
+import "package:locker/services/configuration.dart";
import "package:locker/services/files/sync/models/file.dart";
import "package:locker/services/info_file_service.dart";
import "package:locker/ui/components/file_popup_menu_widget.dart";
@@ -29,6 +30,12 @@ class FileListWidget extends StatelessWidget {
this.onLongPressCallback,
});
+ // TODO: Re-enable file popup menu for shared files when file actions are ready
+ bool get _isFileOwnedByUser {
+ final currentUserID = Configuration.instance.getUserID();
+ return file.ownerID == currentUserID;
+ }
+
@override
Widget build(BuildContext context) {
final colorScheme = getEnteColorScheme(context);
@@ -109,17 +116,19 @@ class FileListWidget extends StatelessWidget {
iconButtonType: IconButtonType.secondary,
iconColor: colorScheme.primary700,
)
- : FilePopupMenuWidget(
- file: file,
- overflowActions: overflowActions,
- child: Padding(
- padding: const EdgeInsets.all(12.0),
- child: HugeIcon(
- icon: HugeIcons.strokeRoundedMoreVertical,
- color: getEnteColorScheme(context).textBase,
- ),
- ),
- ),
+ : _isFileOwnedByUser
+ ? FilePopupMenuWidget(
+ file: file,
+ overflowActions: overflowActions,
+ child: Padding(
+ padding: const EdgeInsets.all(12.0),
+ child: HugeIcon(
+ icon: HugeIcons.strokeRoundedMoreVertical,
+ color: getEnteColorScheme(context).textBase,
+ ),
+ ),
+ )
+ : const SizedBox(width: 48),
),
),
],
diff --git a/mobile/apps/locker/lib/ui/pages/collection_page.dart b/mobile/apps/locker/lib/ui/pages/collection_page.dart
index edebf09bf4..ab124c1561 100644
--- a/mobile/apps/locker/lib/ui/pages/collection_page.dart
+++ b/mobile/apps/locker/lib/ui/pages/collection_page.dart
@@ -313,10 +313,14 @@ class _CollectionPageState extends UploaderPageState<CollectionPage>
borderRadius: BorderRadius.circular(16),
side: BorderSide(color: colorScheme.strokeFaint),
),
+ color: colorScheme.backdropBase,
+ surfaceTintColor: Colors.transparent,
+ padding: EdgeInsets.zero,
+ menuPadding: EdgeInsets.zero,
elevation: 15,
- padding: const EdgeInsetsGeometry.all(0),
- menuPadding: const EdgeInsets.all(0),
shadowColor: Colors.black.withValues(alpha: 0.08),
+ constraints: const BoxConstraints(minWidth: 120),
+ offset: const Offset(-36, 36),
child: Container(
height: 48,
width: 48,
diff --git a/mobile/apps/locker/lib/ui/sharing/share_collection_bottom_sheet.dart b/mobile/apps/locker/lib/ui/sharing/share_collection_bottom_sheet.dart
index d10c9f4f0c..ffed902d3c 100644
--- a/mobile/apps/locker/lib/ui/sharing/share_collection_bottom_sheet.dart
+++ b/mobile/apps/locker/lib/ui/sharing/share_collection_bottom_sheet.dart
@@ -355,21 +355,22 @@ class _ShareCollectionBottomSheetState
isLast: false,
),
),
- PopupMenuItem<String>(
- value: "collaborator",
- height: 0,
- padding: EdgeInsets.zero,
- child: PopupMenuItemWidget(
- icon: HugeIcon(
- icon: HugeIcons.strokeRoundedUserMultiple,
- color: colorScheme.textBase,
- size: 20,
- ),
- label: context.l10n.collaborator,
- isFirst: false,
- isLast: false,
- ),
- ),
+ // TODO: Re-enable collaborator option when ready
+ // PopupMenuItem<String>(
+ // value: "collaborator",
+ // height: 0,
+ // padding: EdgeInsets.zero,
+ // child: PopupMenuItemWidget(
+ // icon: HugeIcon(
+ // icon: HugeIcons.strokeRoundedUserMultiple,
+ // color: colorScheme.textBase,
+ // size: 20,
+ // ),
+ // label: context.l10n.collaborator,
+ // isFirst: false,
+ // isLast: false,
+ // ),
+ // ),
PopupMenuItem<String>(
value: "remove",
height: 0,
diff --git a/mobile/apps/locker/lib/utils/collection_actions.dart b/mobile/apps/locker/lib/utils/collection_actions.dart
index 31d840cbfb..3580abbacb 100644
--- a/mobile/apps/locker/lib/utils/collection_actions.dart
+++ b/mobile/apps/locker/lib/utils/collection_actions.dart
@@ -334,7 +334,7 @@ class CollectionActions {
context,
title: context.l10n.leaveCollection,
message: context.l10n.filesAddedByYouWillBeRemovedFromTheCollection,
- assetPath: "assets/warning-red.png",
+ assetPath: "assets/warning-grey.png",
buttons: [
SizedBox(
child: GradientButton(