From f806c47c7c42b17a7895e1d20a701e74f2a7f204 Mon Sep 17 00:00:00 2001 From: naskya Date: Fri, 26 Apr 2024 07:26:58 +0900 Subject: [PATCH] style: move QR code and remote follow URL to another category --- locales/en-US.yml | 4 +-- locales/zh-CN.yml | 2 +- packages/client/src/scripts/get-user-menu.ts | 35 ++++++++++++-------- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index 12f43ee4ba..fa2a0b11ce 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1159,9 +1159,9 @@ addRe: "Add \"re:\" at the beginning of comment in reply to a post with a conten confirm: "Confirm" importZip: "Import ZIP" exportZip: "Export ZIP" -getQrCode: "Get QR code" +getQrCode: "Show QR code" remoteFollow: "Remote follow" -remoteFollowUrl: "Remote follow URL" +copyRemoteFollowUrl: "Copy remote follow URL" emojiPackCreator: "Emoji pack creator" indexable: "Indexable" indexableDescription: "Allow built-in search to show your public posts" diff --git a/locales/zh-CN.yml b/locales/zh-CN.yml index 984f7e5831..7642fc80db 100644 --- a/locales/zh-CN.yml +++ b/locales/zh-CN.yml @@ -1978,7 +1978,7 @@ importZip: 导入 ZIP exportZip: 导出 ZIP getQrCode: "获取二维码" remoteFollow: "远程关注" -remoteFollowUrl: "远程关注 URL" +copyRemoteFollowUrl: "复制远程关注 URL" emojiPackCreator: 表情包创建工具 objectStorageS3ForcePathStyleDesc: 打开此选项可构建格式为 "s3.amazonaws.com//" 而非 ".s3.amazonaws.com" 的端点 URL。 diff --git a/packages/client/src/scripts/get-user-menu.ts b/packages/client/src/scripts/get-user-menu.ts index e7edaec391..7a3046aad7 100644 --- a/packages/client/src/scripts/get-user-menu.ts +++ b/packages/client/src/scripts/get-user-menu.ts @@ -255,6 +255,27 @@ export function getUserMenu(user, router: Router = mainRouter) { router.push(`/user-info/${user.id}`); }, }, + { + icon: `${icon("ph-share")}`, + text: i18n.ts.share, + type: "parent", + children: [ + { + icon: "ph-qr-code ph-bold ph-lg", + text: i18n.ts.getQrCode, + action: () => { + os.displayQrCode(`https://${host}/follow-me?acct=${user.username}`); + }, + }, + { + icon: `${icon("ph-hand-waving")}`, + text: i18n.ts.copyRemoteFollowUrl, + action: () => { + copyToClipboard(`https://${host}/follow-me?acct=${user.username}`); + }, + }, + ], + }, { icon: `${icon("ph-newspaper")}`, text: i18n.ts._feeds.copyFeed, @@ -281,13 +302,6 @@ export function getUserMenu(user, router: Router = mainRouter) { copyToClipboard(`https://${host}/@${user.username}.json`); }, }, - { - icon: `${icon("ph-hand-waving")}`, - text: i18n.ts.remoteFollowUrl, - action: () => { - copyToClipboard(`https://${host}/follow-me?acct=${user.username}`); - }, - }, ], }, { @@ -306,13 +320,6 @@ export function getUserMenu(user, router: Router = mainRouter) { }, } : undefined, - { - icon: "ph-qr-code ph-bold ph-lg", - text: i18n.ts.getQrCode, - action: () => { - os.displayQrCode(`https://${host}/follow-me?acct=${user.username}`); - }, - }, isSignedIn(me) && me.id !== user.id ? { type: "link",