diff --git a/CHANGELOG_CHERRYPICK.md b/CHANGELOG_CHERRYPICK.md index 8b438eeee7..5be4565772 100644 --- a/CHANGELOG_CHERRYPICK.md +++ b/CHANGELOG_CHERRYPICK.md @@ -28,6 +28,9 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2023xx](CHANGE 기반 Misskey 버전: 2023.x.x
Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2023xx](CHANGELOG.md#2023xx) 문서를 참고하십시오. +### Client +- Feat: 노트 편집 시 토스트 알림을 표시하고 사운드를 재생 + ### Server - Revert: Perf: 부팅 시 MeiliSearch 설정을 업데이트하지 마십시오 (MisskeyIO/misskey#158) diff --git a/locales/en-US.yml b/locales/en-US.yml index c620e0da2e..98279718f0 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1,5 +1,6 @@ --- _lang_: "English" +noteEdited: "Note are now edited." removeModalBgColorForBlur: "Remove modal background color" skipThisVersion: "Skip this release" enableReceivePrerelease: "Get notified of pre-release versions" @@ -1977,6 +1978,7 @@ _theme: _sfx: note: "New note" noteMy: "Own note" + noteEdited: "Note Edited" notification: "Notifications" chat: "Chat" chatBg: "Chat (Background)" diff --git a/locales/index.d.ts b/locales/index.d.ts index 37acba03ad..62d383aa2c 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -3,6 +3,7 @@ // Do not edit this file directly. export interface Locale { "_lang_": string; + "noteEdited": string; "removeModalBgColorForBlur": string; "skipThisVersion": string; "enableReceivePrerelease": string; @@ -2104,6 +2105,7 @@ export interface Locale { "_sfx": { "note": string; "noteMy": string; + "noteEdited": string; "notification": string; "chat": string; "chatBg": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 2907b6929a..a71de709d7 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1,5 +1,6 @@ _lang_: "日本語" +noteEdited: "ノートを編集しました。" removeModalBgColorForBlur: "モーダル背景色を削除" skipThisVersion: "このリリースをスキップする" enableReceivePrerelease: "プレリリース版の通知を受け取る" @@ -2018,6 +2019,7 @@ _theme: _sfx: note: "ノート" noteMy: "ノート(自分)" + noteEdited: "ノートを編集" notification: "通知" chat: "チャット" chatBg: "チャット(バックグラウンド)" diff --git a/locales/ko-KR.yml b/locales/ko-KR.yml index 9921e5dfae..36dd2c4d95 100644 --- a/locales/ko-KR.yml +++ b/locales/ko-KR.yml @@ -1,5 +1,6 @@ --- _lang_: "한국어" +noteEdited: "노트를 편집했어요!" removeModalBgColorForBlur: "모달 배경색 제거" skipThisVersion: "이 릴리즈 건너뛰기" enableReceivePrerelease: "출시 전 버전 알림 받기" @@ -1954,6 +1955,7 @@ _theme: _sfx: note: "새 노트" noteMy: "내 노트" + noteEdited: "노트 편집" notification: "알림" chat: "대화" chatBg: "대화 (백그라운드)" diff --git a/packages/frontend/src/components/MkNoteToast.vue b/packages/frontend/src/components/MkNoteToast.vue index 5442bd8ecd..304949b50c 100644 --- a/packages/frontend/src/components/MkNoteToast.vue +++ b/packages/frontend/src/components/MkNoteToast.vue @@ -14,7 +14,7 @@ SPDX-License-Identifier: AGPL-3.0-only >
- + {{ message }}
diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue index 4153827cef..ef0e320bc6 100644 --- a/packages/frontend/src/components/MkPostForm.vue +++ b/packages/frontend/src/components/MkPostForm.vue @@ -47,7 +47,7 @@ SPDX-License-Identifier: AGPL-3.0-only - + @@ -130,6 +130,7 @@ import MkRippleEffect from '@/components/MkRippleEffect.vue'; import { miLocalStorage } from '@/local-storage.js'; import { claimAchievement } from '@/scripts/achievements.js'; import { vibrate } from '@/scripts/vibrate.js'; +import * as sound from '@/scripts/sound.js'; const modal = inject('modal'); @@ -241,9 +242,11 @@ const submitText = $computed((): string => { ? i18n.ts.quote : props.reply ? i18n.ts.reply - : defaultStore.state.renameTheButtonInPostFormToNya - ? i18n.ts.nya - : i18n.ts.note; + : props.updateMode + ? i18n.ts.edit + : defaultStore.state.renameTheButtonInPostFormToNya + ? i18n.ts.nya + : i18n.ts.note; }); const textLength = $computed((): number => { @@ -790,6 +793,7 @@ async function post(ev?: MouseEvent) { nextTick(() => { if (props.reply) os.noteToast(i18n.ts.replied, 'reply'); else if (props.renote) os.noteToast(i18n.ts.quoted, 'quote'); + else if (props.updateMode) os.noteToast(i18n.ts.noteEdited, 'edited'); else os.noteToast(i18n.ts.posted, 'posted'); deleteDraft(); @@ -851,6 +855,7 @@ async function post(ev?: MouseEvent) { text: err.message + '\n' + (err as any).id, }); }); + if (props.updateMode) sound.play('noteEdited'); vibrate(ColdDeviceStorage.get('vibrateSystem') ? [10, 20, 10, 20, 10, 20, 60] : ''); } diff --git a/packages/frontend/src/components/MkPostFormSimple.vue b/packages/frontend/src/components/MkPostFormSimple.vue index 2b8891c76f..0faffa6869 100644 --- a/packages/frontend/src/components/MkPostFormSimple.vue +++ b/packages/frontend/src/components/MkPostFormSimple.vue @@ -53,7 +53,7 @@ SPDX-License-Identifier: AGPL-3.0-only - + @@ -81,7 +81,7 @@ SPDX-License-Identifier: AGPL-3.0-only - + @@ -151,6 +151,7 @@ import { miLocalStorage } from '@/local-storage.js'; import { claimAchievement } from '@/scripts/achievements.js'; import { vibrate } from '@/scripts/vibrate.js'; import XSigninDialog from '@/components/MkSigninDialog.vue'; +import * as sound from '@/scripts/sound.js'; const modal = inject('modal'); @@ -268,9 +269,11 @@ const submitText = $computed((): string => { ? i18n.ts.quote : props.reply ? i18n.ts.reply - : defaultStore.state.renameTheButtonInPostFormToNya - ? i18n.ts.nya - : i18n.ts.note; + : props.updateMode + ? i18n.ts.edit + : defaultStore.state.renameTheButtonInPostFormToNya + ? i18n.ts.nya + : i18n.ts.note; }); const textLength = $computed((): number => { @@ -811,6 +814,7 @@ async function post(ev?: MouseEvent) { nextTick(() => { if (props.reply) os.noteToast(i18n.ts.replied, 'reply'); else if (props.renote) os.noteToast(i18n.ts.quoted, 'quote'); + else if (props.updateMode) os.noteToast(i18n.ts.noteEdited, 'edited'); else os.noteToast(i18n.ts.posted, 'posted'); deleteDraft(); @@ -872,6 +876,7 @@ async function post(ev?: MouseEvent) { text: err.message + '\n' + (err as any).id, }); }); + if (props.updateMode) sound.play('noteEdited'); vibrate(ColdDeviceStorage.get('vibrateSystem') ? [10, 20, 10, 20, 10, 20, 60] : ''); } diff --git a/packages/frontend/src/pages/settings/preferences-backups.vue b/packages/frontend/src/pages/settings/preferences-backups.vue index 047bbf3f25..57ecb937e5 100644 --- a/packages/frontend/src/pages/settings/preferences-backups.vue +++ b/packages/frontend/src/pages/settings/preferences-backups.vue @@ -136,6 +136,7 @@ const coldDeviceStorageSaveKeys: (keyof typeof ColdDeviceStorage.default)[] = [ 'sound_masterVolume', 'sound_note', 'sound_noteMy', + 'sound_noteEdited', 'sound_notification', 'sound_chat', 'sound_chatBg', diff --git a/packages/frontend/src/pages/settings/sounds-and-vibrations.vue b/packages/frontend/src/pages/settings/sounds-and-vibrations.vue index cb46519cbe..c64740aea9 100644 --- a/packages/frontend/src/pages/settings/sounds-and-vibrations.vue +++ b/packages/frontend/src/pages/settings/sounds-and-vibrations.vue @@ -54,11 +54,12 @@ import { unisonReload } from '@/scripts/unison-reload.js'; const masterVolume = computed(soundConfigStore.makeGetterSetter('sound_masterVolume')); -const soundsKeys = ['note', 'noteMy', 'notification', 'chat', 'chatBg', 'antenna', 'channel'] as const; +const soundsKeys = ['note', 'noteMy', 'noteEdited', 'notification', 'chat', 'chatBg', 'antenna', 'channel'] as const; const sounds = ref>>({ note: soundConfigStore.reactiveState.sound_note, noteMy: soundConfigStore.reactiveState.sound_noteMy, + noteEdited: soundConfigStore.reactiveState.sound_noteEdited, notification: soundConfigStore.reactiveState.sound_notification, chat: soundConfigStore.reactiveState.sound_chat, chatBg: soundConfigStore.reactiveState.sound_chatBg, diff --git a/packages/frontend/src/scripts/sound.ts b/packages/frontend/src/scripts/sound.ts index ef3e206b78..161099e696 100644 --- a/packages/frontend/src/scripts/sound.ts +++ b/packages/frontend/src/scripts/sound.ts @@ -19,6 +19,10 @@ export const soundConfigStore = markRaw(new Storage('sound', { where: 'account', default: { type: 'syuilo/n-cea-4va', volume: 1 }, }, + sound_noteEdited: { + where: 'account', + default: { type: 'syuilo/n-eca', volume: 1 }, + }, sound_notification: { where: 'account', default: { type: 'syuilo/n-ea', volume: 1 }, @@ -125,7 +129,7 @@ export function setVolume(audio: HTMLAudioElement, volume: number): HTMLAudioEle return audio; } -export function play(type: 'noteMy' | 'note' | 'chat' | 'chatBg' | 'antenna' | 'channel' | 'notification') { +export function play(type: 'noteMy' | 'note' | 'noteEdited' | 'chat' | 'chatBg' | 'antenna' | 'channel' | 'notification') { const sound = soundConfigStore.state[`sound_${type}`]; if (_DEV_) console.log('play', type, sound); if (sound.type == null) return; diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index d59edb2789..1ab077e841 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -594,9 +594,10 @@ export class ColdDeviceStorage { vibrateChatBg: true, vibrateSystem: true, sound_masterVolume: 0.5, - sound_note: { type: 'syuilo/down', volume: 0.5 }, - sound_noteMy: { type: 'syuilo/up', volume: 0.5 }, - sound_notification: { type: 'syuilo/pope2', volume: 0.5 }, + sound_note: { type: 'syuilo/n-aec', volume: 0.5 }, + sound_noteMy: { type: 'syuilo/n-cea-4va', volume: 0.5 }, + sound_noteEdited: { type: 'syuilo/n-eca', volume: 0.5 }, + sound_notification: { type: 'syuilo/n-ea', volume: 0.5 }, sound_chat: { type: 'syuilo/pope1', volume: 0.5 }, sound_chatBg: { type: 'syuilo/waon', volume: 0.5 }, sound_antenna: { type: 'syuilo/triple', volume: 0.5 },