From 776796910f9ee238574ca17b200cf559bac0ddfb Mon Sep 17 00:00:00 2001 From: NoriDev Date: Wed, 27 Sep 2023 21:16:14 +0900 Subject: [PATCH] =?UTF-8?q?feat(friendly):=20=E9=95=B7=E6=8A=BC=E3=81=97?= =?UTF-8?q?=E3=81=A7=E3=82=A2=E3=82=AB=E3=82=A6=E3=83=B3=E3=83=88=E3=83=A1?= =?UTF-8?q?=E3=83=8B=E3=83=A5=E3=83=BC=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=AA=E3=83=97=E3=82=B7=E3=83=A7=E3=83=B3=E3=82=92?= =?UTF-8?q?=E7=84=A1=E5=8A=B9=E3=81=AB=E3=81=99=E3=82=8B=E3=81=93=E3=81=A8?= =?UTF-8?q?=E3=81=8C=E3=81=A7=E3=81=8D=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG_CHERRYPICK.md | 1 + locales/en-US.yml | 1 + locales/index.d.ts | 1 + locales/ja-JP.yml | 1 + locales/ko-KR.yml | 1 + .../frontend/src/pages/settings/cherrypick.vue | 9 +++++++++ packages/frontend/src/store.ts | 4 ++++ packages/frontend/src/ui/friendly.vue | 18 ++++++++++-------- 8 files changed, 28 insertions(+), 8 deletions(-) diff --git a/CHANGELOG_CHERRYPICK.md b/CHANGELOG_CHERRYPICK.md index 73d0f6d5ab..2ca7dfdce4 100644 --- a/CHANGELOG_CHERRYPICK.md +++ b/CHANGELOG_CHERRYPICK.md @@ -46,6 +46,7 @@ - Enhance: 메모리 할당자를 jemalloc으로 설정 (MisskeyIO/misskey#152) ### Client +- Feat: (Friendly) 길게 눌러 계정 메뉴를 표시하는 옵션을 비활성화 할 수 있음 - Feat: about-misskey 페이지에서 클라이언트 버전을 누르면 변경 사항을 볼 수 있음 - Feat: 이미지 압축 방식을 선택할 수 있음 - 사이즈 변경 여부를 선택할 수 있음 diff --git a/locales/en-US.yml b/locales/en-US.yml index 4ac242e6a2..c90020536d 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1246,6 +1246,7 @@ _cherrypick: mobileHeaderChange: "Header design change in mobile environment" renameTheButtonInPostFormToNya: "Change the \"Note\" button on the note-posting form to \"Nyan!\"" renameTheButtonInPostFormToNyaDescription: "Outside of the note-posting form, they are still as \"Note\"." + enableLongPressOpenAccountMenu: "Press and hold to open the account menu." _bannerDisplay: all: "All" topBottom: "Top and Bottom" diff --git a/locales/index.d.ts b/locales/index.d.ts index 3cb7cefee6..9023e96839 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1255,6 +1255,7 @@ export interface Locale { "mobileHeaderChange": string; "renameTheButtonInPostFormToNya": string; "renameTheButtonInPostFormToNyaDescription": string; + "enableLongPressOpenAccountMenu": string; }; "_bannerDisplay": { "all": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 9f6e1eef1e..ffb7c063f8 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1252,6 +1252,7 @@ _cherrypick: mobileHeaderChange: "モバイル環境でヘッダーのデザインを変更" renameTheButtonInPostFormToNya: "ノート作成画面の「ノート」ボタンを「にゃ!」に変更する" renameTheButtonInPostFormToNyaDescription: "にゃあにゃんにゃんにゃんにゃにゃん?" + enableLongPressOpenAccountMenu: "長押しでアカウントメニューを開く" _bannerDisplay: all: "全て" diff --git a/locales/ko-KR.yml b/locales/ko-KR.yml index 945fc8bcd7..03271624cf 100644 --- a/locales/ko-KR.yml +++ b/locales/ko-KR.yml @@ -1235,6 +1235,7 @@ _cherrypick: mobileHeaderChange: "모바일 환경에서 헤더 디자인을 변경" renameTheButtonInPostFormToNya: "노트 작성 화면의 '노트' 버튼을 '냥!'으로 변경" renameTheButtonInPostFormToNyaDescription: "냐앙냥냥냥냐냥?" + enableLongPressOpenAccountMenu: "길게 눌러 계정 메뉴 열기" _bannerDisplay: all: "전부" topBottom: "상단 및 하단" diff --git a/packages/frontend/src/pages/settings/cherrypick.vue b/packages/frontend/src/pages/settings/cherrypick.vue index c395790201..6eef4a5e9d 100644 --- a/packages/frontend/src/pages/settings/cherrypick.vue +++ b/packages/frontend/src/pages/settings/cherrypick.vue @@ -43,6 +43,7 @@ SPDX-License-Identifier: AGPL-3.0-only +
@@ -57,6 +58,13 @@ SPDX-License-Identifier: AGPL-3.0-only
+ + + +
+ {{ i18n.ts._cherrypick.enableLongPressOpenAccountMenu }} +
+
@@ -90,6 +98,7 @@ const showFollowingMessageInsteadOfButtonEnabled = computed(defaultStore.makeGet const mobileHeaderChange = computed(defaultStore.makeGetterSetter('mobileHeaderChange')); const displayHeaderNavBarWhenScroll = computed(defaultStore.makeGetterSetter('displayHeaderNavBarWhenScroll')); const renameTheButtonInPostFormToNya = computed(defaultStore.makeGetterSetter('renameTheButtonInPostFormToNya')); +const enableLongPressOpenAccountMenu = computed(defaultStore.makeGetterSetter('enableLongPressOpenAccountMenu')); watch([ reactableRemoteReactionEnabled, diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index a4b992e2a2..bf25a98761 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -533,6 +533,10 @@ export const defaultStore = markRaw(new Storage('base', { where: 'account', default: false, }, + enableLongPressOpenAccountMenu: { + where: 'device', + default: true, + }, // - etc friendlyEnableNotifications: { diff --git a/packages/frontend/src/ui/friendly.vue b/packages/frontend/src/ui/friendly.vue index 6d216d56bc..07f328040b 100644 --- a/packages/frontend/src/ui/friendly.vue +++ b/packages/frontend/src/ui/friendly.vue @@ -300,14 +300,16 @@ function queueUpdated(q: number): void { } function openAccountMenu(ev: MouseEvent) { - longTouchNavHome = true; - setTimeout(() => { - if (longTouchNavHome === true) { - openAccountMenu_({ - withExtraOperationFriendly: true, - }, ev); - } - }, 500); + if (defaultStore.state.enableLongPressOpenAccountMenu) { + longTouchNavHome = true; + setTimeout(() => { + if (longTouchNavHome === true) { + openAccountMenu_({ + withExtraOperationFriendly: true, + }, ev); + } + }, 500); + } } function closeAccountMenu() {