From 412dcfa62a30d39a323179dec558ad3f2e4a65e8 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 17 Aug 2025 13:26:17 +0800 Subject: [PATCH] :lipstick: Move the publisher invite icon to the list --- assets/i18n/en-US.json | 8 ++++++- assets/i18n/zh-CN.json | 8 ++++++- lib/screens/creators/hub.dart | 41 +++++++++++++++-------------------- 3 files changed, 31 insertions(+), 26 deletions(-) diff --git a/assets/i18n/en-US.json b/assets/i18n/en-US.json index 498fe6c1..9d8d15a2 100644 --- a/assets/i18n/en-US.json +++ b/assets/i18n/en-US.json @@ -844,5 +844,11 @@ "postSlugHint": "The slug can be used to access your post via URL in the webpage, it should be publisher-wide unique.", "attachmentOnDevice": "On-device", "attachmentOnCloud": "On-cloud", - "attachments": "Attachments" + "attachments": "Attachments", + "publisherCollabInvitation": "Collabration invitations", + "publisherCollabInvitationCount": { + "zero": "No invitation", + "one": "{} available invitation", + "other": "{} available invitations" + } } diff --git a/assets/i18n/zh-CN.json b/assets/i18n/zh-CN.json index af10e589..335f219f 100644 --- a/assets/i18n/zh-CN.json +++ b/assets/i18n/zh-CN.json @@ -818,5 +818,11 @@ "postSlug": "别名", "postSlugHint": "这个别名可以用于在网页通过 URL 浏览到你的帖子,它应该在同一发布者中是唯一。", "attachmentOnDevice": "离线", - "attachmentOnCloud": "在线" + "attachmentOnCloud": "在线", + "publisherCollabInvitation": "协作邀请", + "publisherCollabInvitationCount": { + "zero": "无邀请", + "one": "{} 个可用邀请", + "other": "{} 个可用邀请" + } } diff --git a/lib/screens/creators/hub.dart b/lib/screens/creators/hub.dart index adeb5747..e77e7054 100644 --- a/lib/screens/creators/hub.dart +++ b/lib/screens/creators/hub.dart @@ -212,30 +212,6 @@ class CreatorHubScreen extends HookConsumerWidget { leading: !isWide ? const PageBackButton() : null, title: Text('creatorHub').tr(), actions: [ - IconButton( - icon: Badge( - label: Text( - publisherInvites.when( - data: (invites) => invites.length.toString(), - error: (_, _) => '0', - loading: () => '0', - ), - ), - isLabelVisible: publisherInvites.when( - data: (invites) => invites.isNotEmpty, - error: (_, _) => false, - loading: () => false, - ), - child: const Icon(Symbols.email), - ), - onPressed: () { - showModalBottomSheet( - context: context, - isScrollControlled: true, - builder: (_) => const _PublisherInviteSheet(), - ); - }, - ), DropdownButtonHideUnderline( child: DropdownButton2( alignment: Alignment.centerRight, @@ -323,6 +299,23 @@ class CreatorHubScreen extends HookConsumerWidget { ), ) ?? []), + ListTile( + leading: const CircleAvatar( + child: Icon(Symbols.mail), + ), + title: Text('publisherCollabInvitation').tr(), + subtitle: Text( + 'publisherCollabInvitationCount', + ).plural(publisherInvites.value?.length ?? 0), + trailing: const Icon(Symbols.chevron_right), + onTap: () { + showModalBottomSheet( + context: context, + isScrollControlled: true, + builder: (_) => const _PublisherInviteSheet(), + ); + }, + ), ListTile( leading: const CircleAvatar( child: Icon(Symbols.add),