From 3ad6830bfb51edf1b21683c8a107dbaf563e90a2 Mon Sep 17 00:00:00 2001 From: reya Date: Wed, 1 Nov 2023 14:58:20 +0700 Subject: [PATCH] update title bar --- src/shared/titleBar.tsx | 84 ++++++++++++++++++----------- src/shared/widgets/newsfeed.tsx | 2 +- src/shared/widgets/notification.tsx | 2 +- 3 files changed, 54 insertions(+), 34 deletions(-) diff --git a/src/shared/titleBar.tsx b/src/shared/titleBar.tsx index 7bb8d3ba..b3f23467 100644 --- a/src/shared/titleBar.tsx +++ b/src/shared/titleBar.tsx @@ -5,42 +5,62 @@ import { User } from '@shared/user'; import { useWidget } from '@utils/hooks/useWidget'; -export function TitleBar({ id, title }: { id?: string; title?: string }) { +export function TitleBar({ + id, + title, + isLive, +}: { + id?: string; + title?: string; + isLive?: boolean; +}) { const { db } = useStorage(); const { removeWidget } = useWidget(); return ( -
-
- {id === '9999' ? ( -
- {db.account.circles - ?.slice(0, 10) - .map((item) => )} - {db.account.circles?.length > 10 ? ( -
- - +{db.account.circles?.length - 10} - -
- ) : null} -
- ) : ( -

- {title} -

- )} - {id !== '9999' ? ( - - ) : ( -
- )} +
+
+ {isLive ? ( +
+ + + + +

Live

+
+ ) : null} +
+
+ {id === '9999' ? ( +
+ {db.account.circles + ?.slice(0, 8) + .map((item) => )} + {db.account.circles?.length > 8 ? ( +
+ + +{db.account.circles?.length - 8} + +
+ ) : null} +
+ ) : ( +

+ {title} +

+ )} +
+
+ {id !== '9999' ? ( + + ) : null} +
); } diff --git a/src/shared/widgets/newsfeed.tsx b/src/shared/widgets/newsfeed.tsx index 12a9c510..75774a52 100644 --- a/src/shared/widgets/newsfeed.tsx +++ b/src/shared/widgets/newsfeed.tsx @@ -140,7 +140,7 @@ export function NewsfeedWidget() { return ( - + {status === 'pending' ? (
diff --git a/src/shared/widgets/notification.tsx b/src/shared/widgets/notification.tsx index 2265803f..034cb520 100644 --- a/src/shared/widgets/notification.tsx +++ b/src/shared/widgets/notification.tsx @@ -134,7 +134,7 @@ export function NotificationWidget() { return ( - + {status === 'pending' ? (