diff --git a/CHANGELOG_CHERRYPICK.md b/CHANGELOG_CHERRYPICK.md index 921f67404a..4de2d460f5 100644 --- a/CHANGELOG_CHERRYPICK.md +++ b/CHANGELOG_CHERRYPICK.md @@ -36,6 +36,7 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2023xx](CHANGE ### Client - Enhance: 리액션 상태에 따라 버튼의 툴팁을 다르게 표시함 - Enhance: 노트 헤더의 편집됨 아이콘에 커서를 올리면 마지막으로 노트를 편집한 시간을 툴팁으로 표시함 +- Enhance: 번역을 완료하면 진동으로 알림 - Fix: 역할 설정에 잘못된 설정이 표시됨 - Fix: 비공개 노트에 답글을 달 수 있음 - 답글이 달리면 해당 비공개 노트의 내용을 다른 사람이 볼 수 있음 diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index 31827360d3..71e3367a83 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -231,6 +231,7 @@ import { notePage } from '@/filters/note.js'; import { miLocalStorage } from '@/local-storage.js'; import { instance } from '@/instance.js'; import { concat } from '@/scripts/array.js'; +import { vibrate } from '@/scripts/vibrate.js'; let showEl = $ref(false); @@ -569,6 +570,8 @@ async function translate(): Promise { if (translation.value != null) return; translating.value = true; + vibrate(ColdDeviceStorage.get('vibrateSystem') ? 5 : []); + if (props.mock) { return; } @@ -579,6 +582,8 @@ async function translate(): Promise { }); translating.value = false; translation.value = res; + + vibrate(ColdDeviceStorage.get('vibrateSystem') ? [5, 5, 10] : []); } function showRenoteMenu(viaKeyboard = false): void { diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index afdced72e3..2ad554682d 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -313,6 +313,7 @@ import { miLocalStorage } from '@/local-storage.js'; import { infoImageUrl, instance } from '@/instance.js'; import MkPostForm from '@/components/MkPostFormSimple.vue'; import { deviceKind } from '@/scripts/device-kind.js'; +import { vibrate } from '@/scripts/vibrate.js'; const MOBILE_THRESHOLD = 500; const isMobile = ref(deviceKind === 'smartphone' || window.innerWidth <= MOBILE_THRESHOLD); @@ -593,12 +594,17 @@ function menu(viaKeyboard = false): void { async function translate(): Promise { if (translation.value != null) return; translating.value = true; + + vibrate(ColdDeviceStorage.get('vibrateSystem') ? 5 : []); + const res = await os.api('notes/translate', { noteId: appearNote.id, targetLang: miLocalStorage.getItem('lang') ?? navigator.language, }); translating.value = false; translation.value = res; + + vibrate(ColdDeviceStorage.get('vibrateSystem') ? [5, 5, 10] : []); } async function clip() { diff --git a/packages/frontend/src/components/MkSubNoteContent.vue b/packages/frontend/src/components/MkSubNoteContent.vue index 3e3f0129fd..622448bd1a 100644 --- a/packages/frontend/src/components/MkSubNoteContent.vue +++ b/packages/frontend/src/components/MkSubNoteContent.vue @@ -141,6 +141,7 @@ import { reactionPicker } from '@/scripts/reaction-picker.js'; import { claimAchievement } from '@/scripts/achievements.js'; import { useNoteCapture } from '@/scripts/use-note-capture.js'; import { concat } from '@/scripts/array.js'; +import { vibrate } from '@/scripts/vibrate.js'; const props = withDefaults(defineProps<{ note: Misskey.entities.Note; @@ -397,6 +398,8 @@ async function translate(): Promise { if (translation.value != null) return; translating.value = true; + vibrate(ColdDeviceStorage.get('vibrateSystem') ? 5 : []); + if (props.mock) { return; } @@ -407,6 +410,8 @@ async function translate(): Promise { }); translating.value = false; translation.value = res; + + vibrate(ColdDeviceStorage.get('vibrateSystem') ? [5, 5, 10] : []); } function focus() { diff --git a/packages/frontend/src/pages/user/home.vue b/packages/frontend/src/pages/user/home.vue index c266ebc0b7..d0ab4a1acd 100644 --- a/packages/frontend/src/pages/user/home.vue +++ b/packages/frontend/src/pages/user/home.vue @@ -183,9 +183,10 @@ import { confetti } from '@/scripts/confetti.js'; import MkNotes from '@/components/MkNotes.vue'; import { api } from '@/os.js'; import { isFfVisibleForMe } from '@/scripts/isFfVisibleForMe.js'; -import { defaultStore } from '@/store.js'; +import { ColdDeviceStorage, defaultStore } from '@/store.js'; import { miLocalStorage } from '@/local-storage.js'; import { editNickname } from '@/scripts/edit-nickname.js'; +import { vibrate } from '@/scripts/vibrate.js'; function calcAge(birthdate: string): number { const date = new Date(birthdate); @@ -292,12 +293,17 @@ async function updateMemo() { async function translate(): Promise { if (translation.value != null) return; translating.value = true; + + vibrate(ColdDeviceStorage.get('vibrateSystem') ? 5 : []); + const res = await os.api('users/translate', { userId: props.user.id, targetLang: miLocalStorage.getItem('lang') ?? navigator.language, }); translating.value = false; translation.value = res; + + vibrate(ColdDeviceStorage.get('vibrateSystem') ? [5, 5, 10] : []); } watch([props.user], () => {