From bd05fafa27da2932aa3a430dd602eb79478204e7 Mon Sep 17 00:00:00 2001 From: vineyardbovines Date: Tue, 3 Mar 2026 16:51:49 -0500 Subject: [PATCH] ui wip --- src/Navigation.tsx | 9 +++ src/components/AccountList.tsx | 6 ++ src/components/BotAccountInfoDialog.tsx | 14 ++-- src/components/BotBadge.tsx | 75 +++++++++++++++++-- .../PostControls/ShareMenu/RecentChats.tsx | 2 + src/components/ProfileCard.tsx | 3 + src/components/ProfileHoverCard/index.web.tsx | 2 + src/components/dms/MessagesListHeader.tsx | 2 + src/components/icons/Robot.tsx | 11 ++- src/components/moderation/LabelsOnMe.tsx | 6 +- src/lib/routes/types.ts | 1 + src/routes.ts | 1 + .../Messages/components/ChatListItem.tsx | 2 + .../components/ThreadItemAnchor.tsx | 2 + .../Profile/Header/ProfileHeaderStandard.tsx | 4 + .../Search/components/SearchHistory.tsx | 2 + src/screens/Settings/AccountSettings.tsx | 17 +++++ .../Settings/AutomationLabelSettings.tsx | 15 +--- src/screens/Settings/Settings.tsx | 9 +++ src/view/com/composer/ComposerReplyTo.tsx | 2 + .../text-input/mobile/Autocomplete.tsx | 2 + .../notifications/NotificationFeedItem.tsx | 3 + src/view/com/util/PostMeta.tsx | 11 +++ src/view/shell/Drawer.tsx | 2 + 24 files changed, 176 insertions(+), 27 deletions(-) diff --git a/src/Navigation.tsx b/src/Navigation.tsx index 03ff43d739..156b7986d6 100644 --- a/src/Navigation.tsx +++ b/src/Navigation.tsx @@ -99,6 +99,7 @@ import {SearchScreen} from '#/screens/Search' import {AboutSettingsScreen} from '#/screens/Settings/AboutSettings' import {AccessibilitySettingsScreen} from '#/screens/Settings/AccessibilitySettings' import {AccountSettingsScreen} from '#/screens/Settings/AccountSettings' +import {AutomationLabelSettingsScreen} from '#/screens/Settings/AutomationLabelSettings' import {ActivityPrivacySettingsScreen} from '#/screens/Settings/ActivityPrivacySettings' import {AppearanceSettingsScreen} from '#/screens/Settings/AppearanceSettings' import {AppIconSettingsScreen} from '#/screens/Settings/AppIconSettings' @@ -403,6 +404,14 @@ function commonScreens(Stack: typeof Flat, unreadCountLabel?: string) { requireAuth: true, }} /> + AutomationLabelSettingsScreen} + options={{ + title: title(msg`Automation Label`), + requireAuth: true, + }} + /> PrivacyAndSecuritySettingsScreen} diff --git a/src/components/AccountList.tsx b/src/components/AccountList.tsx index ad0f44809d..2e5e39aaa4 100644 --- a/src/components/AccountList.tsx +++ b/src/components/AccountList.tsx @@ -12,6 +12,7 @@ import {useProfilesQuery} from '#/state/queries/profile' import {type SessionAccount, useSession} from '#/state/session' import {UserAvatar} from '#/view/com/util/UserAvatar' import {atoms as a, useTheme} from '#/alf' +import {BotBadge} from '#/components/BotBadge' import {Button} from '#/components/Button' import {CheckThick_Stroke2_Corner0_Rounded as CheckIcon} from '#/components/icons/Check' import {ChevronRight_Stroke2_Corner0_Rounded as ChevronIcon} from '#/components/icons/Chevron' @@ -172,6 +173,11 @@ function AccountItem({ /> )} + {profile && ( + + + + )} - - - - - This account has been marked as automated by its owner. - + + + + + + This account has been marked as automated by its owner + + ) } diff --git a/src/components/PostControls/ShareMenu/RecentChats.tsx b/src/components/PostControls/ShareMenu/RecentChats.tsx index 3ba2682239..07943d073c 100644 --- a/src/components/PostControls/ShareMenu/RecentChats.tsx +++ b/src/components/PostControls/ShareMenu/RecentChats.tsx @@ -15,6 +15,7 @@ import {useListConvosQuery} from '#/state/queries/messages/list-conversations' import {useSession} from '#/state/session' import {UserAvatar} from '#/view/com/util/UserAvatar' import {atoms as a, tokens, useTheme} from '#/alf' +import {BotBadge} from '#/components/BotBadge' import {Button} from '#/components/Button' import {useDialogContext} from '#/components/Dialog' import {Text} from '#/components/Typography' @@ -149,6 +150,7 @@ function RecentChatItem({ /> )} + ) diff --git a/src/components/ProfileCard.tsx b/src/components/ProfileCard.tsx index 1cbfc2b50d..54906e33d5 100644 --- a/src/components/ProfileCard.tsx +++ b/src/components/ProfileCard.tsx @@ -30,6 +30,7 @@ import { useTheme, type ViewStyleProp, } from '#/alf' +import {BotBadge} from '#/components/BotBadge' import { Button, ButtonIcon, @@ -272,6 +273,7 @@ function InlineNameAndHandle({ /> )} + )} + ) } diff --git a/src/components/ProfileHoverCard/index.web.tsx b/src/components/ProfileHoverCard/index.web.tsx index 8586607e52..938bdf330c 100644 --- a/src/components/ProfileHoverCard/index.web.tsx +++ b/src/components/ProfileHoverCard/index.web.tsx @@ -23,6 +23,7 @@ import {formatCount} from '#/view/com/util/numeric/format' import {UserAvatar} from '#/view/com/util/UserAvatar' import {ProfileHeaderHandle} from '#/screens/Profile/Header/Handle' import {atoms as a, useTheme} from '#/alf' +import {BotBadge} from '#/components/BotBadge' import {Button, ButtonIcon, ButtonText} from '#/components/Button' import {useFollowMethods} from '#/components/hooks/useFollowMethods' import {useRichText} from '#/components/hooks/useRichText' @@ -541,6 +542,7 @@ function Inner({ /> )} + diff --git a/src/components/dms/MessagesListHeader.tsx b/src/components/dms/MessagesListHeader.tsx index afdeee545e..1f87c77371 100644 --- a/src/components/dms/MessagesListHeader.tsx +++ b/src/components/dms/MessagesListHeader.tsx @@ -15,6 +15,7 @@ import {isConvoActive, useConvo} from '#/state/messages/convo' import {type ConvoItem} from '#/state/messages/convo/types' import {PreviewableUserAvatar} from '#/view/com/util/UserAvatar' import {atoms as a, useTheme, web} from '#/alf' +import {BotBadge} from '#/components/BotBadge' import {ConvoMenu} from '#/components/dms/ConvoMenu' import {Bell2Off_Filled_Corner0_Rounded as BellStroke} from '#/components/icons/Bell2' import * as Layout from '#/components/Layout' @@ -169,6 +170,7 @@ function HeaderReady({ /> )} + {!isDeletedAccount && ( !l.val.startsWith('!')) + labels = labels.filter( + l => + !l.val.startsWith('!') && + !(l.val === 'bot' && l.src === currentAccount.did), + ) if (!labels.length) { return null } diff --git a/src/lib/routes/types.ts b/src/lib/routes/types.ts index 0a3a0d5458..5bb7265709 100644 --- a/src/lib/routes/types.ts +++ b/src/lib/routes/types.ts @@ -50,6 +50,7 @@ export type CommonNavigatorParams = { AccessibilitySettings: undefined AppearanceSettings: undefined AccountSettings: undefined + AutomationLabelSettings: undefined PrivacyAndSecuritySettings: undefined ActivityPrivacySettings: undefined ContentAndMediaSettings: undefined diff --git a/src/routes.ts b/src/routes.ts index f325539c71..75eda461c8 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -50,6 +50,7 @@ export const router = new Router({ AppearanceSettings: '/settings/appearance', SavedFeeds: '/settings/saved-feeds', AccountSettings: '/settings/account', + AutomationLabelSettings: '/settings/automation-label', PrivacyAndSecuritySettings: '/settings/privacy-and-security', ActivityPrivacySettings: '/settings/privacy-and-security/activity', ContentAndMediaSettings: '/settings/content-and-media', diff --git a/src/screens/Messages/components/ChatListItem.tsx b/src/screens/Messages/components/ChatListItem.tsx index f09cf23007..30985b21f4 100644 --- a/src/screens/Messages/components/ChatListItem.tsx +++ b/src/screens/Messages/components/ChatListItem.tsx @@ -31,6 +31,7 @@ import {TimeElapsed} from '#/view/com/util/TimeElapsed' import {PreviewableUserAvatar} from '#/view/com/util/UserAvatar' import {atoms as a, useBreakpoints, useTheme, web} from '#/alf' import * as tokens from '#/alf/tokens' +import {BotBadge} from '#/components/BotBadge' import {useDialogControl} from '#/components/Dialog' import {ConvoMenu} from '#/components/dms/ConvoMenu' import {LeaveConvoPrompt} from '#/components/dms/LeaveConvoPrompt' @@ -422,6 +423,7 @@ function ChatListItemReady({ /> )} + {lastMessageSentAt && ( diff --git a/src/screens/PostThread/components/ThreadItemAnchor.tsx b/src/screens/PostThread/components/ThreadItemAnchor.tsx index 1531784aee..80ebec2b8c 100644 --- a/src/screens/PostThread/components/ThreadItemAnchor.tsx +++ b/src/screens/PostThread/components/ThreadItemAnchor.tsx @@ -34,6 +34,7 @@ import { REPLY_LINE_WIDTH, } from '#/screens/PostThread/const' import {atoms as a, useTheme} from '#/alf' +import {BotBadge} from '#/components/BotBadge' import {Button} from '#/components/Button' import {DebugFieldDisplay} from '#/components/DebugFieldDisplay' import {CalendarClock_Stroke2_Corner0_Rounded as CalendarClockIcon} from '#/components/icons/CalendarClock' @@ -364,6 +365,7 @@ const ThreadItemAnchorInner = memo(function ThreadItemAnchorInner({ + + + + diff --git a/src/screens/Search/components/SearchHistory.tsx b/src/screens/Search/components/SearchHistory.tsx index 5b463ae75d..6cae572c93 100644 --- a/src/screens/Search/components/SearchHistory.tsx +++ b/src/screens/Search/components/SearchHistory.tsx @@ -10,6 +10,7 @@ import {useModerationOpts} from '#/state/preferences/moderation-opts' import {UserAvatar} from '#/view/com/util/UserAvatar' import {BlockDrawerGesture} from '#/view/shell/BlockDrawerGesture' import {atoms as a} from '#/alf' +import {BotBadge} from '#/components/BotBadge' import {Button, ButtonIcon} from '#/components/Button' import {TimesLarge_Stroke2_Corner0_Rounded as XIcon} from '#/components/icons/Times' import * as Layout from '#/components/Layout' @@ -173,6 +174,7 @@ function RecentProfileItem({ /> )} +