From f2100011aa3d1cd25a31fa075f5cb9e9aaadd368 Mon Sep 17 00:00:00 2001 From: NoriDev Date: Thu, 12 Oct 2023 20:09:55 +0900 Subject: [PATCH] =?UTF-8?q?enhance(frontend):=20=E6=8C=AF=E5=8B=95?= =?UTF-8?q?=E6=A9=9F=E8=83=BD=E3=81=AE=E6=94=B9=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG_CHERRYPICK.md | 3 ++ locales/en-US.yml | 13 +++++-- locales/index.d.ts | 12 +++++-- locales/ja-JP.yml | 12 +++++-- locales/ko-KR.yml | 11 ++++-- packages/frontend/src/boot/main-boot.ts | 2 ++ packages/frontend/src/components/MkButton.vue | 3 +- .../frontend/src/components/MkContainer.vue | 4 +-- .../frontend/src/components/MkEmojiPicker.vue | 4 +-- packages/frontend/src/components/MkFolder.vue | 4 +-- .../src/components/MkFollowButton.vue | 3 +- packages/frontend/src/components/MkMenu.vue | 3 +- packages/frontend/src/components/MkNote.vue | 24 ++++++------- .../src/components/MkNoteDetailed.vue | 18 +++++----- packages/frontend/src/components/MkOmit.vue | 3 +- .../frontend/src/components/MkPostForm.vue | 4 +-- .../src/components/MkPostFormSimple.vue | 4 +-- packages/frontend/src/components/MkRadio.vue | 3 +- packages/frontend/src/components/MkRange.vue | 3 +- .../components/MkReactionsViewer.reaction.vue | 4 +-- .../src/components/MkSubNoteContent.vue | 22 ++++++------ .../src/components/MkSwitch.button.vue | 3 +- .../frontend/src/components/MkTimeline.vue | 5 ++- .../src/components/global/CPPageHeader.vue | 8 ++--- .../frontend/src/components/global/MkA.vue | 3 +- .../components/global/MkPageHeader.tabs.vue | 4 +-- .../src/components/global/MkPageHeader.vue | 8 ++--- .../frontend/src/pages/admin/_header_.vue | 5 +-- .../src/pages/messaging/messaging-room.vue | 4 +-- .../pages/settings/preferences-backups.vue | 5 +++ .../pages/settings/sounds-and-vibrations.vue | 34 +++++++++++++++++-- packages/frontend/src/store.ts | 5 +++ packages/frontend/src/ui/_common_/common.vue | 4 ++- .../src/ui/_common_/navbar-for-mobile.vue | 12 +++---- packages/frontend/src/ui/_common_/navbar.vue | 12 +++---- packages/frontend/src/ui/classic.header.vue | 10 +++--- packages/frontend/src/ui/classic.sidebar.vue | 10 +++--- packages/frontend/src/ui/deck.vue | 18 +++++----- packages/frontend/src/ui/friendly.vue | 22 ++++++------ .../src/ui/friendly/navbar-for-mobile.vue | 14 ++++---- packages/frontend/src/ui/friendly/navbar.vue | 16 ++++----- packages/frontend/src/ui/universal.vue | 14 ++++---- .../frontend/src/ui/universal.widgets.vue | 6 ++-- packages/frontend/src/ui/visitor.vue | 6 ++-- packages/frontend/src/ui/zen.vue | 3 +- 45 files changed, 239 insertions(+), 151 deletions(-) diff --git a/CHANGELOG_CHERRYPICK.md b/CHANGELOG_CHERRYPICK.md index 2738b00454..41cbbbf60e 100644 --- a/CHANGELOG_CHERRYPICK.md +++ b/CHANGELOG_CHERRYPICK.md @@ -37,6 +37,9 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2023xx](CHANGE ### General - Feat: 읽지 않은 알림 수를 표시할 수 있음 (misskey-dev/misskey#11982) +- Feat: 햅틱 피드백 개선 + - 지원 범위 추가 + - 설정을 세부적으로 변경할 수 있음 - Fix: 서버 측에서 테스트 알림을 올바르게 수행할 수 있도록 수정 (misskey-dev/misskey#11982) ### Client diff --git a/locales/en-US.yml b/locales/en-US.yml index d088c848d8..72accd59ec 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -602,9 +602,9 @@ newNoteRecived: "There are new notes" sounds: "Sounds" sound: "Sounds" vibrations: "Vibrations" -soundsAndVibrations: "Sounds and Vibrations" -playVibrationsOnClick: "Play vibrations on click" -playVibrationsOnClickDescription: "This feature is not supported on iOS/iPadOS." +soundsAndVibrations: "Sounds & Vibrations" +playVibrations: "Play vibrations" +playVibrationsDescription: "This feature is not supported on iOS/iPadOS." listen: "Listen" none: "None" showInPage: "Show in page" @@ -1224,6 +1224,13 @@ additionalPermissionsForFlash: "Allow to add permission to Play" thisFlashRequiresTheFollowingPermissions: "This Play requires the following permissions" doYouWantToAllowThisPlayToAccessYourAccount: "Do you want to allow this Play to access your account?" translateProfile: "Translate profile" +_vibrations: + click: "When an element is clicked" + note: "When a new note is posted on the timeline" + notification: "When a receive the notifications" + chat: "Chat" + chatBg: "Chat (Background)" + system: "System Haptics" _showingAnimatedImages: always: "Always animate" interaction: "Animate on interaction" diff --git a/locales/index.d.ts b/locales/index.d.ts index 27d5b22137..38044d0c5b 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -606,8 +606,8 @@ export interface Locale { "sound": string; "vibrations": string; "soundsAndVibrations": string; - "playVibrationsOnClick": string; - "playVibrationsOnClickDescription": string; + "playVibrations": string; + "playVibrationsDescription": string; "listen": string; "none": string; "showInPage": string; @@ -1227,6 +1227,14 @@ export interface Locale { "thisFlashRequiresTheFollowingPermissions": string; "doYouWantToAllowThisPlayToAccessYourAccount": string; "translateProfile": string; + "_vibrations": { + "click": string; + "note": string; + "notification": string; + "chat": string; + "chatBg": string; + "system": string; + }; "_showingAnimatedImages": { "always": string; "interaction": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index bab4c64c09..b37403cbd1 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -603,8 +603,8 @@ sounds: "サウンド" sound: "サウンド" vibrations: "振動" soundsAndVibrations: "サウンドと振動" -playVibrationsOnClick: "クリック時の振動再生" -playVibrationsOnClickDescription: "この機能はiOS/iPadOSではサポートされていません。" +playVibrations: "振動再生" +playVibrationsDescription: "この機能はiOS/iPadOSではサポートされていません。" listen: "聴く" none: "なし" showInPage: "ページで表示" @@ -1225,6 +1225,14 @@ thisFlashRequiresTheFollowingPermissions: "このPlayは以下の権限を要求 doYouWantToAllowThisPlayToAccessYourAccount: "このPlayによるアカウントへのアクセスを許可しますか?" translateProfile: "プロフィールを翻訳する" +_vibrations: + click: "要素をクリックしたとき" + note: "タイムラインに新しいノートがあるとき" + notification: "通知を受け取ったとき" + chat: "チャット" + chatBg: "チャット(バックグラウンド)" + system: "システムの触覚" + _showingAnimatedImages: always: "常に再生" interaction: "インタラクト時に再生" diff --git a/locales/ko-KR.yml b/locales/ko-KR.yml index 0830c8c6d0..92fce634fc 100644 --- a/locales/ko-KR.yml +++ b/locales/ko-KR.yml @@ -604,8 +604,8 @@ sounds: "소리" sound: "소리" vibrations: "진동" soundsAndVibrations: "소리 및 진동" -playVibrationsOnClick: "클릭 시 진동 재생" -playVibrationsOnClickDescription: "이 기능은 iOS/iPadOS에서는 지원되지 않아요." +playVibrations: "진동 재생" +playVibrationsDescription: "이 기능은 iOS/iPadOS에서는 지원되지 않아요." listen: "듣기" none: "없음" showInPage: "페이지로 보기" @@ -1214,6 +1214,13 @@ additionalPermissionsForFlash: "Play에 대한 추가 권한" thisFlashRequiresTheFollowingPermissions: "이 Play는 다음 권한을 요구해요" doYouWantToAllowThisPlayToAccessYourAccount: "이 Play가 계정에 접근하도록 허용할까요?" translateProfile: "프로필 번역하기" +_vibrations: + click: "요소를 클릭했을 때" + note: "타임라인에 새 노트가 올라왔을 때" + notification: "알림을 수신했을 때" + chat: "대화" + chatBg: "대화 (백그라운드)" + system: "시스템 햅틱" _showingAnimatedImages: always: "항상 움직임" interaction: "건드리면 움직임" diff --git a/packages/frontend/src/boot/main-boot.ts b/packages/frontend/src/boot/main-boot.ts index 80541aac1d..75059fbabc 100644 --- a/packages/frontend/src/boot/main-boot.ts +++ b/packages/frontend/src/boot/main-boot.ts @@ -20,6 +20,7 @@ import { mainRouter } from '@/router.js'; import { initializeSw } from '@/scripts/initialize-sw.js'; import { deckStore } from '@/ui/deck/deck-store.js'; import { userName } from '@/filters/user.js'; +import { vibrate } from '@/scripts/vibrate.js'; export async function mainBoot() { const { isClientUpdated } = await common(() => createApp( @@ -264,6 +265,7 @@ export async function mainBoot() { main.on('unreadMessagingMessage', () => { updateAccount({ hasUnreadMessagingMessage: true }); sound.play('chatBg'); + vibrate(ColdDeviceStorage.get('vibrateChatBg') ? [50, 40] : ''); }); main.on('readAllAntennas', () => { diff --git a/packages/frontend/src/components/MkButton.vue b/packages/frontend/src/components/MkButton.vue index a6a1d1d7b2..11b039bf34 100644 --- a/packages/frontend/src/components/MkButton.vue +++ b/packages/frontend/src/components/MkButton.vue @@ -35,6 +35,7 @@ SPDX-License-Identifier: AGPL-3.0-only