From e490407dd5f4afcd28f0a40d4cbdd370d8bb0ead Mon Sep 17 00:00:00 2001 From: codytseng Date: Thu, 22 Jan 2026 22:28:07 +0800 Subject: [PATCH] chore: format --- .prettierrc.yaml | 1 + package-lock.json | 80 +++++++++++++++++++ package.json | 3 +- src/PageManager.tsx | 24 +++--- src/components/AboutInfoDialog/index.tsx | 2 +- src/components/AccountList/index.tsx | 14 ++-- src/components/AccountManager/BunkerLogin.tsx | 2 +- .../AccountManager/NostrConnectionLogin.tsx | 26 +++--- src/components/AccountManager/NpubLogin.tsx | 2 +- src/components/AccountManager/Signup.tsx | 14 ++-- src/components/AccountManager/index.tsx | 10 +-- src/components/AudioPlayer/index.tsx | 12 +-- src/components/BookmarkButton/index.tsx | 2 +- src/components/BookmarkList/index.tsx | 4 +- .../BottomNavigationBar/AccountButton.tsx | 4 +- .../BottomNavigationBarItem.tsx | 2 +- .../NotificationsButton.tsx | 2 +- src/components/BottomNavigationBar/index.tsx | 6 +- src/components/ClientTag/index.tsx | 2 +- src/components/Collapsible/index.tsx | 6 +- src/components/Content/index.tsx | 2 +- .../CommunityDefinitionPreview.tsx | 2 +- .../ContentPreview/EmojiPackPreview.tsx | 2 +- .../ContentPreview/FollowPackPreview.tsx | 2 +- .../ContentPreview/GroupMetadataPreview.tsx | 2 +- .../ContentPreview/HighlightPreview.tsx | 2 +- .../ContentPreview/LiveEventPreview.tsx | 2 +- .../ContentPreview/LongFormArticlePreview.tsx | 2 +- .../ContentPreview/PictureNotePreview.tsx | 2 +- src/components/ContentPreview/PollPreview.tsx | 2 +- .../ContentPreview/VideoNotePreview.tsx | 2 +- src/components/DefaultRelaysSetting/index.tsx | 12 +-- src/components/Donation/PlatinumSponsors.tsx | 6 +- src/components/Donation/RecentSupporters.tsx | 14 ++-- src/components/Donation/index.tsx | 4 +- src/components/DrawerMenuItem/index.tsx | 2 +- src/components/Embedded/EmbeddedLNInvoice.tsx | 10 +-- src/components/Embedded/EmbeddedMention.tsx | 2 +- src/components/Embedded/EmbeddedNote.tsx | 18 ++--- .../Embedded/EmbeddedWebsocketUrl.tsx | 2 +- src/components/Emoji/index.tsx | 4 +- src/components/EmojiPackList/index.tsx | 2 +- src/components/EmojiPickerDialog/index.tsx | 2 +- src/components/ErrorBoundary.tsx | 6 +- src/components/Explore/index.tsx | 10 +-- src/components/ExternalContent/index.tsx | 2 +- .../ExternalContentInteractions/Tabs.tsx | 6 +- .../ExternalContentInteractions/index.tsx | 6 +- src/components/ExternalLink/index.tsx | 4 +- .../FavoriteRelaysSetting/AddNewRelay.tsx | 4 +- .../FavoriteRelaysSetting/AddNewRelaySet.tsx | 2 +- .../FavoriteRelayList.tsx | 2 +- .../PullRelaySetsButton.tsx | 4 +- .../FavoriteRelaysSetting/RelayItem.tsx | 10 +-- .../FavoriteRelaysSetting/RelaySet.tsx | 20 ++--- .../FavoriteRelaysSetting/RelaySetList.tsx | 2 +- .../FavoriteRelaysSetting/RelayUrl.tsx | 10 +-- src/components/FeedSwitcher/index.tsx | 28 +++---- src/components/FollowButton/index.tsx | 4 +- src/components/FollowingBadge/index.tsx | 2 +- .../FollowingFavoriteRelayList/index.tsx | 4 +- src/components/HighlightButton/index.tsx | 4 +- src/components/Image/index.tsx | 20 ++--- src/components/ImageGallery/index.tsx | 8 +- src/components/ImageWithLightbox/index.tsx | 2 +- src/components/InfoCard/index.tsx | 2 +- src/components/KindFilter/index.tsx | 12 +-- src/components/LoadingBar/index.tsx | 2 +- src/components/LoginDialog/index.tsx | 4 +- .../MailboxSetting/MailboxRelay.tsx | 10 +-- .../MailboxSetting/NewMailboxRelayInput.tsx | 2 +- src/components/MailboxSetting/index.tsx | 4 +- src/components/MediaPlayer/index.tsx | 2 +- src/components/MuteButton/index.tsx | 4 +- src/components/NewNotesButton/index.tsx | 6 +- src/components/Nip05/index.tsx | 12 +-- src/components/NotFound/index.tsx | 2 +- src/components/Note/CommunityDefinition.tsx | 10 +-- src/components/Note/EmojiPack.tsx | 4 +- src/components/Note/FollowPack.tsx | 12 +-- src/components/Note/GroupMetadata.tsx | 10 +-- src/components/Note/Highlight.tsx | 10 +-- src/components/Note/LiveEvent.tsx | 16 ++-- src/components/Note/LongFormArticle/index.tsx | 18 ++--- .../Note/LongFormArticlePreview.tsx | 14 ++-- src/components/Note/MutedNote.tsx | 2 +- src/components/Note/NsfwNote.tsx | 2 +- src/components/Note/Poll.tsx | 10 +-- src/components/Note/RelayReview.tsx | 2 +- src/components/Note/UnknownNote.tsx | 2 +- src/components/Note/index.tsx | 12 +-- src/components/NoteCard/MainNoteCard.tsx | 2 +- src/components/NoteCard/PinnedButton.tsx | 6 +- src/components/NoteCard/RepostDescription.tsx | 10 +-- src/components/NoteCard/index.tsx | 8 +- src/components/NoteInteractions/Tabs.tsx | 6 +- src/components/NoteInteractions/index.tsx | 4 +- src/components/NoteList/index.tsx | 6 +- src/components/NoteOptions/MobileMenu.tsx | 8 +- src/components/NoteOptions/RawEventDialog.tsx | 2 +- src/components/NoteOptions/index.tsx | 2 +- src/components/NoteOptions/useMenuActions.tsx | 4 +- .../NotificationItem/Notification.tsx | 46 +++++------ .../NotificationItem/ReactionNotification.tsx | 4 +- .../NotificationItem/ZapNotification.tsx | 4 +- src/components/NpubQrCode/index.tsx | 12 +-- src/components/OthersRelayList/index.tsx | 2 +- src/components/ParentNotePreview/index.tsx | 12 +-- src/components/PasswordInputDialog/index.tsx | 2 +- src/components/PostEditor/Mentions.tsx | 10 +-- src/components/PostEditor/PollEditor.tsx | 2 +- src/components/PostEditor/PostContent.tsx | 18 ++--- src/components/PostEditor/PostOptions.tsx | 2 +- .../PostEditor/PostRelaySelector.tsx | 10 +-- .../PostTextarea/Emoji/EmojiList.tsx | 6 +- .../PostTextarea/Mention/MentionList.tsx | 10 +-- .../PostTextarea/Mention/MentionNode.tsx | 2 +- src/components/PostEditor/Title.tsx | 4 +- src/components/PostEditor/index.tsx | 8 +- src/components/Profile/AvatarWithLightbox.tsx | 2 +- src/components/Profile/BannerWithLightbox.tsx | 2 +- src/components/Profile/Followings.tsx | 4 +- src/components/Profile/Relays.tsx | 4 +- src/components/Profile/index.tsx | 40 +++++----- src/components/ProfileCard/index.tsx | 12 +-- src/components/ProfileOptions/index.tsx | 8 +- src/components/PubkeyCopy/index.tsx | 2 +- src/components/QrCode/index.tsx | 2 +- src/components/ReactionList/index.tsx | 10 +-- src/components/RelayInfo/RelayReviewCard.tsx | 12 +-- .../RelayInfo/RelayReviewsPreview.tsx | 8 +- src/components/RelayInfo/ReviewEditor.tsx | 8 +- src/components/RelayInfo/index.tsx | 34 ++++---- .../InviteCodeDialog.tsx | 2 +- .../RelayMembershipControl/index.tsx | 6 +- src/components/RelaySetCard/index.tsx | 20 ++--- src/components/RelaySimpleInfo/index.tsx | 24 +++--- src/components/ReplyNote/index.tsx | 28 +++---- src/components/ReplyNoteList/SubReplies.tsx | 12 +-- src/components/ReplyNoteList/index.tsx | 2 +- src/components/RepostList/index.tsx | 10 +-- .../SaveRelayDropdownMenu/index.tsx | 2 +- src/components/ScrollToTopButton/index.tsx | 6 +- src/components/SearchBar/index.tsx | 66 +++++++-------- src/components/SearchInput/index.tsx | 6 +- src/components/Settings/index.tsx | 4 +- src/components/Sidebar/AccountButton.tsx | 22 ++--- src/components/Sidebar/LayoutSwitcher.tsx | 6 +- src/components/Sidebar/NotificationButton.tsx | 2 +- src/components/Sidebar/PostButton.tsx | 2 +- src/components/Sidebar/SidebarItem.tsx | 8 +- src/components/Sidebar/index.tsx | 14 ++-- src/components/SignerTypeBadge/index.tsx | 12 ++- src/components/Stars/index.tsx | 2 +- src/components/StuffStats/LikeButton.tsx | 4 +- src/components/StuffStats/Likes.tsx | 12 +-- src/components/StuffStats/ReplyButton.tsx | 2 +- src/components/StuffStats/RepostButton.tsx | 6 +- src/components/StuffStats/SeenOnButton.tsx | 4 +- src/components/StuffStats/TopZaps.tsx | 6 +- src/components/StuffStats/ZapButton.tsx | 2 +- src/components/StuffStats/index.tsx | 4 +- src/components/SuggestedEmojis/index.tsx | 8 +- src/components/Tabs/index.tsx | 14 ++-- src/components/Titlebar/index.tsx | 2 +- .../TooManyRelaysAlertDialog/index.tsx | 4 +- src/components/TranslateButton/index.tsx | 2 +- src/components/TrendingNotes/index.tsx | 4 +- src/components/TrustScoreFilter/index.tsx | 12 +-- src/components/UserAggregationList/index.tsx | 26 +++--- src/components/UserItem/index.tsx | 12 +-- src/components/VideoPlayer/index.tsx | 2 +- src/components/WebPreview/index.tsx | 18 ++--- src/components/XEmbeddedPost/Post.tsx | 6 +- src/components/XEmbeddedPost/index.tsx | 2 +- .../YoutubeEmbeddedPlayer/Player.tsx | 4 +- .../YoutubeEmbeddedPlayer/index.tsx | 2 +- src/components/ZapDialog/index.tsx | 16 ++-- src/components/ZapList/index.tsx | 14 ++-- src/components/ui/checkbox.tsx | 2 +- src/components/ui/command.tsx | 6 +- src/components/ui/dialog.tsx | 4 +- src/components/ui/drawer.tsx | 4 +- src/components/ui/dropdown-menu.tsx | 26 +++--- src/components/ui/input.tsx | 2 +- src/components/ui/popover.tsx | 2 +- src/components/ui/select.tsx | 2 +- src/components/ui/slider.tsx | 6 +- src/components/ui/textarea.tsx | 2 +- src/layouts/SecondaryPageLayout/index.tsx | 8 +- src/lib/event-metadata.ts | 2 +- src/pages/primary/BookmarkPage/index.tsx | 2 +- src/pages/primary/ExplorePage/index.tsx | 4 +- src/pages/primary/MePage/index.tsx | 14 ++-- src/pages/primary/NoteListPage/FeedButton.tsx | 10 +-- .../primary/NoteListPage/FollowingFeed.tsx | 10 +-- src/pages/primary/NoteListPage/index.tsx | 16 ++-- .../primary/NotificationListPage/index.tsx | 6 +- src/pages/primary/ProfilePage/index.tsx | 2 +- src/pages/primary/RelayPage/index.tsx | 4 +- src/pages/primary/SettingsPage/index.tsx | 2 +- .../AppearanceSettingsPage/index.tsx | 14 ++-- .../secondary/ExternalContentPage/index.tsx | 2 +- src/pages/secondary/FollowPackPage/index.tsx | 18 ++--- .../GeneralSettingsPage/MutedWords.tsx | 2 +- .../GeneralSettingsPage/SettingItem.tsx | 2 +- .../secondary/GeneralSettingsPage/index.tsx | 2 +- src/pages/secondary/MuteListPage/index.tsx | 8 +- src/pages/secondary/NoteListPage/index.tsx | 4 +- src/pages/secondary/NotePage/NotFound.tsx | 2 +- src/pages/secondary/NotePage/index.tsx | 26 +++--- .../BlossomServerListSetting.tsx | 10 +-- .../secondary/PostSettingsPage/index.tsx | 2 +- .../secondary/ProfileEditorPage/index.tsx | 20 ++--- src/pages/secondary/ProfileListPage/index.tsx | 2 +- .../secondary/RelaySettingsPage/index.tsx | 2 +- src/pages/secondary/RizfulPage/index.tsx | 14 ++-- src/pages/secondary/SearchPage/index.tsx | 2 +- .../secondary/SystemSettingsPage/index.tsx | 8 +- .../JumbleTranslate/AccountInfo.tsx | 6 +- .../TranslationPage/JumbleTranslate/TopUp.tsx | 2 +- src/pages/secondary/TranslationPage/index.tsx | 2 +- .../UserAggregationDetailPage/index.tsx | 4 +- .../secondary/WalletPage/QuickZapSwitch.tsx | 4 +- src/pages/secondary/WalletPage/index.tsx | 6 +- 225 files changed, 924 insertions(+), 844 deletions(-) diff --git a/.prettierrc.yaml b/.prettierrc.yaml index 35893b3..dabdd95 100644 --- a/.prettierrc.yaml +++ b/.prettierrc.yaml @@ -2,3 +2,4 @@ singleQuote: true semi: false printWidth: 100 trailingComma: none +plugins: [prettier-plugin-tailwindcss] diff --git a/package-lock.json b/package-lock.json index 4f77f74..0f21091 100644 --- a/package-lock.json +++ b/package-lock.json @@ -95,6 +95,7 @@ "globals": "^15.13.0", "postcss": "^8.4.49", "prettier": "3.4.2", + "prettier-plugin-tailwindcss": "^0.7.2", "tailwindcss": "^3.4.17", "typescript": "~5.6.2", "typescript-eslint": "^8.18.1", @@ -10392,6 +10393,85 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/prettier-plugin-tailwindcss": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.7.2.tgz", + "integrity": "sha512-LkphyK3Fw+q2HdMOoiEHWf93fNtYJwfamoKPl7UwtjFQdei/iIBoX11G6j706FzN3ymX9mPVi97qIY8328vdnA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.19" + }, + "peerDependencies": { + "@ianvs/prettier-plugin-sort-imports": "*", + "@prettier/plugin-hermes": "*", + "@prettier/plugin-oxc": "*", + "@prettier/plugin-pug": "*", + "@shopify/prettier-plugin-liquid": "*", + "@trivago/prettier-plugin-sort-imports": "*", + "@zackad/prettier-plugin-twig": "*", + "prettier": "^3.0", + "prettier-plugin-astro": "*", + "prettier-plugin-css-order": "*", + "prettier-plugin-jsdoc": "*", + "prettier-plugin-marko": "*", + "prettier-plugin-multiline-arrays": "*", + "prettier-plugin-organize-attributes": "*", + "prettier-plugin-organize-imports": "*", + "prettier-plugin-sort-imports": "*", + "prettier-plugin-svelte": "*" + }, + "peerDependenciesMeta": { + "@ianvs/prettier-plugin-sort-imports": { + "optional": true + }, + "@prettier/plugin-hermes": { + "optional": true + }, + "@prettier/plugin-oxc": { + "optional": true + }, + "@prettier/plugin-pug": { + "optional": true + }, + "@shopify/prettier-plugin-liquid": { + "optional": true + }, + "@trivago/prettier-plugin-sort-imports": { + "optional": true + }, + "@zackad/prettier-plugin-twig": { + "optional": true + }, + "prettier-plugin-astro": { + "optional": true + }, + "prettier-plugin-css-order": { + "optional": true + }, + "prettier-plugin-jsdoc": { + "optional": true + }, + "prettier-plugin-marko": { + "optional": true + }, + "prettier-plugin-multiline-arrays": { + "optional": true + }, + "prettier-plugin-organize-attributes": { + "optional": true + }, + "prettier-plugin-organize-imports": { + "optional": true + }, + "prettier-plugin-sort-imports": { + "optional": true + }, + "prettier-plugin-svelte": { + "optional": true + } + } + }, "node_modules/pretty-bytes": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-6.1.1.tgz", diff --git a/package.json b/package.json index 09801a9..ff3ae74 100644 --- a/package.json +++ b/package.json @@ -105,10 +105,11 @@ "globals": "^15.13.0", "postcss": "^8.4.49", "prettier": "3.4.2", + "prettier-plugin-tailwindcss": "^0.7.2", "tailwindcss": "^3.4.17", "typescript": "~5.6.2", "typescript-eslint": "^8.18.1", "vite": "^6.0.3", "vite-plugin-pwa": "^0.21.1" } -} \ No newline at end of file +} diff --git a/src/PageManager.tsx b/src/PageManager.tsx index 19c911d..e9b91cb 100644 --- a/src/PageManager.tsx +++ b/src/PageManager.tsx @@ -339,11 +339,11 @@ export function PageManager({ maxStackSize = 5 }: { maxStackSize?: number }) { > -
-
+
+
-
+
{!!secondaryStack.length && secondaryStack.map((item, index) => (
))}
-
+
- + @@ -407,20 +407,20 @@ export function PageManager({ maxStackSize = 5 }: { maxStackSize?: number }) {
{primaryPages.map(({ name, element, props }) => (
0 && 'shadow-lg', secondaryStack.length === 0 ? 'bg-surface' : '' @@ -440,7 +440,7 @@ export function PageManager({ maxStackSize = 5 }: { maxStackSize?: number }) { {secondaryStack.map((item, index) => (
{item.element} @@ -451,7 +451,7 @@ export function PageManager({ maxStackSize = 5 }: { maxStackSize?: number }) {
- + diff --git a/src/components/AboutInfoDialog/index.tsx b/src/components/AboutInfoDialog/index.tsx index 69e4e59..445160e 100644 --- a/src/components/AboutInfoDialog/index.tsx +++ b/src/components/AboutInfoDialog/index.tsx @@ -40,7 +40,7 @@ export default function AboutInfoDialog({ children }: { children: React.ReactNod {children} -
{content}
+
{content}
) diff --git a/src/components/AccountList/index.tsx b/src/components/AccountList/index.tsx index 7145789..2e7481b 100644 --- a/src/components/AccountList/index.tsx +++ b/src/components/AccountList/index.tsx @@ -37,18 +37,18 @@ export default function AccountList({ .finally(() => setSwitchingAccount(null)) }} > -
-
+
+
-
- -
+
+ +
{formatPubkey(act.pubkey)}
-
+
{switchingAccount && isSameAccount(act, switchingAccount) && ( -
+
)} diff --git a/src/components/AccountManager/BunkerLogin.tsx b/src/components/AccountManager/BunkerLogin.tsx index 0cb3c92..7bf7cc5 100644 --- a/src/components/AccountManager/BunkerLogin.tsx +++ b/src/components/AccountManager/BunkerLogin.tsx @@ -42,7 +42,7 @@ export default function BunkerLogin({ onChange={handleInputChange} className={errMsg ? 'border-destructive' : ''} /> - {errMsg &&
{errMsg}
} + {errMsg &&
{errMsg}
}
- {errMsg &&
{errMsg}
} + {errMsg &&
{errMsg}
}
-
+
-
+
-

{t('Secure Your Account')}

+

{t('Secure Your Account')}

{t('Add an extra layer of protection with a password')}

@@ -201,7 +201,7 @@ export default function Signup({ )}
-
+
-
+
{t("Don't have an account yet?")}
-
@@ -80,7 +80,7 @@ function AccountManagerNav({ <>
-
+
{t('Logged in Accounts')}
close?.()} /> diff --git a/src/components/AudioPlayer/index.tsx b/src/components/AudioPlayer/index.tsx index bce7082..5233489 100644 --- a/src/components/AudioPlayer/index.tsx +++ b/src/components/AudioPlayer/index.tsx @@ -129,7 +129,7 @@ export default function AudioPlayer({
e.stopPropagation()} @@ -137,12 +137,12 @@ export default function AudioPlayer({