Show collect photos in separate section
This commit is contained in:
parent
5c2ecef301
commit
59cd4fe019
|
@ -72,7 +72,6 @@ class _ShareCollectionPageState extends State<ShareCollectionPage> {
|
|||
),
|
||||
leadingIcon: Icons.add,
|
||||
menuItemColor: getEnteColorScheme(context).fillFaint,
|
||||
pressedColor: getEnteColorScheme(context).fillFaint,
|
||||
borderRadius: 4.0,
|
||||
isTopBorderRadiusRemoved: _sharees.isNotEmpty,
|
||||
isBottomBorderRadiusRemoved: true,
|
||||
|
@ -102,7 +101,6 @@ class _ShareCollectionPageState extends State<ShareCollectionPage> {
|
|||
),
|
||||
leadingIcon: Icons.add,
|
||||
menuItemColor: getEnteColorScheme(context).fillFaint,
|
||||
pressedColor: getEnteColorScheme(context).fillFaint,
|
||||
borderRadius: 4.0,
|
||||
isTopBorderRadiusRemoved: _sharees.isNotEmpty,
|
||||
onTap: () async {
|
||||
|
@ -132,9 +130,7 @@ class _ShareCollectionPageState extends State<ShareCollectionPage> {
|
|||
height: 24,
|
||||
),
|
||||
MenuSectionTitle(
|
||||
title: hasUrl
|
||||
? "Public link enabled"
|
||||
: (_sharees.isEmpty ? "Or share a link" : "Share a link"),
|
||||
title: hasUrl ? "Public link enabled" : "Share a link",
|
||||
iconData: Icons.public,
|
||||
),
|
||||
]);
|
||||
|
@ -149,7 +145,6 @@ class _ShareCollectionPageState extends State<ShareCollectionPage> {
|
|||
leadingIcon: Icons.error_outline,
|
||||
leadingIconColor: getEnteColorScheme(context).warning500,
|
||||
menuItemColor: getEnteColorScheme(context).fillFaint,
|
||||
pressedColor: getEnteColorScheme(context).fillFaint,
|
||||
onTap: () async {},
|
||||
isBottomBorderRadiusRemoved: true,
|
||||
),
|
||||
|
@ -169,7 +164,6 @@ class _ShareCollectionPageState extends State<ShareCollectionPage> {
|
|||
),
|
||||
leadingIcon: Icons.copy,
|
||||
menuItemColor: getEnteColorScheme(context).fillFaint,
|
||||
pressedColor: getEnteColorScheme(context).fillFaint,
|
||||
onTap: () async {
|
||||
await Clipboard.setData(ClipboardData(text: url));
|
||||
showShortToast(context, "Link copied to clipboard");
|
||||
|
@ -187,7 +181,6 @@ class _ShareCollectionPageState extends State<ShareCollectionPage> {
|
|||
),
|
||||
leadingIcon: Icons.adaptive.share,
|
||||
menuItemColor: getEnteColorScheme(context).fillFaint,
|
||||
pressedColor: getEnteColorScheme(context).fillFaint,
|
||||
onTap: () async {
|
||||
shareText(url);
|
||||
},
|
||||
|
@ -212,7 +205,6 @@ class _ShareCollectionPageState extends State<ShareCollectionPage> {
|
|||
leadingIcon: Icons.link,
|
||||
trailingIcon: Icons.navigate_next,
|
||||
menuItemColor: getEnteColorScheme(context).fillFaint,
|
||||
pressedColor: getEnteColorScheme(context).fillFaint,
|
||||
trailingIconIsMuted: true,
|
||||
onTap: () async {
|
||||
routeToPage(
|
||||
|
@ -237,7 +229,6 @@ class _ShareCollectionPageState extends State<ShareCollectionPage> {
|
|||
),
|
||||
leadingIcon: Icons.link,
|
||||
menuItemColor: getEnteColorScheme(context).fillFaint,
|
||||
pressedColor: getEnteColorScheme(context).fillFaint,
|
||||
isBottomBorderRadiusRemoved: true,
|
||||
onTap: () async {
|
||||
final bool result =
|
||||
|
@ -247,9 +238,17 @@ class _ShareCollectionPageState extends State<ShareCollectionPage> {
|
|||
}
|
||||
},
|
||||
),
|
||||
DividerWidget(
|
||||
dividerType: DividerType.menu,
|
||||
bgColor: getEnteColorScheme(context).fillFaint,
|
||||
_sharees.isEmpty
|
||||
? const MenuSectionDescriptionWidget(
|
||||
content: "Share with non-ente users",
|
||||
)
|
||||
: const SizedBox.shrink(),
|
||||
const SizedBox(
|
||||
height: 24,
|
||||
),
|
||||
const MenuSectionTitle(
|
||||
title: "Collaborative links",
|
||||
iconData: Icons.public,
|
||||
),
|
||||
MenuItemWidget(
|
||||
captionedTextWidget: const CaptionedTextWidget(
|
||||
|
@ -258,7 +257,6 @@ class _ShareCollectionPageState extends State<ShareCollectionPage> {
|
|||
),
|
||||
leadingIcon: Icons.link,
|
||||
menuItemColor: getEnteColorScheme(context).fillFaint,
|
||||
pressedColor: getEnteColorScheme(context).fillFaint,
|
||||
onTap: () async {
|
||||
final bool result = await collectionActions.enableUrl(
|
||||
context,
|
||||
|
@ -270,15 +268,14 @@ class _ShareCollectionPageState extends State<ShareCollectionPage> {
|
|||
}
|
||||
},
|
||||
),
|
||||
_sharees.isEmpty
|
||||
? const MenuSectionDescriptionWidget(
|
||||
content:
|
||||
"Create a link to allow people to add and view photos in "
|
||||
"your shared album without needing an ente app or account. Great for collecting event photos.",
|
||||
)
|
||||
: const SizedBox.shrink(),
|
||||
]);
|
||||
if (_sharees.isEmpty && !hasUrl) {
|
||||
children.add(
|
||||
const MenuSectionDescriptionWidget(
|
||||
content:
|
||||
"Links allow people without an ente account to view and add photos to your shared albums.",
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return Scaffold(
|
||||
|
@ -297,6 +294,7 @@ class _ShareCollectionPageState extends State<ShareCollectionPage> {
|
|||
padding:
|
||||
const EdgeInsets.symmetric(vertical: 4.0, horizontal: 16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: children,
|
||||
),
|
||||
),
|
||||
|
@ -335,7 +333,6 @@ class EmailItemWidget extends StatelessWidget {
|
|||
),
|
||||
leadingIconSize: 24,
|
||||
menuItemColor: getEnteColorScheme(context).fillFaint,
|
||||
pressedColor: getEnteColorScheme(context).fillFaint,
|
||||
trailingIconIsMuted: true,
|
||||
trailingIcon: Icons.chevron_right,
|
||||
onTap: () async {
|
||||
|
@ -361,7 +358,6 @@ class EmailItemWidget extends StatelessWidget {
|
|||
),
|
||||
leadingIcon: Icons.people_outline,
|
||||
menuItemColor: getEnteColorScheme(context).fillFaint,
|
||||
pressedColor: getEnteColorScheme(context).fillFaint,
|
||||
trailingIconIsMuted: true,
|
||||
trailingIcon: Icons.chevron_right,
|
||||
onTap: () async {
|
||||
|
|
Loading…
Reference in a new issue