From 2a451ebb572531f5dfa34a3f863e2b15d29e7355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?= <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Mon, 27 Nov 2023 17:33:42 +0900 Subject: [PATCH] =?UTF-8?q?enhance(frontend):=20=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E9=9F=B3=E3=81=AB=E3=83=89=E3=83=A9=E3=82=A4=E3=83=96=E3=81=AE?= =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=92=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=20(#1244?= =?UTF-8?q?7)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * (enhance) サウンドにドライブのファイルを使用できるように * Update Changelog * fix * fix design * fix design * Update store.ts * (fix) ファイル名表示 * refactor * (refactor) better types * operationTypeとsoundTypeの混同を防止 * (refactor) * (fix) * enhance jsdoc * driveFile -> _driveFile_ --- CHANGELOG.md | 1 + locales/index.d.ts | 8 + locales/ja-JP.yml | 8 + .../src/pages/settings/sounds.sound.vue | 141 ++++++++++++++++-- .../frontend/src/pages/settings/sounds.vue | 28 +++- packages/frontend/src/scripts/sound.ts | 124 +++++++++++++-- packages/frontend/src/store.ts | 29 +++- .../frontend/src/widgets/WidgetJobQueue.vue | 8 +- 8 files changed, 311 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf3fecb5b..d59307caa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ - Enhance: 絵文字のオートコンプリート機能強化 #12364 - Enhance: ユーザーのRawデータを表示するページが復活 - Enhance: リアクション選択時に音を鳴らせるように +- Enhance: サウンドにドライブのファイルを使用できるように - fix: 「設定のバックアップ」で一部の項目がバックアップに含まれていなかった問題を修正 - Fix: ウィジェットのジョブキューにて音声の発音方法変更に追従できていなかったのを修正 #12367 - Fix: コードエディタが正しく表示されない問題を修正 diff --git a/locales/index.d.ts b/locales/index.d.ts index 6097ae130..64ee30410 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1947,6 +1947,14 @@ export interface Locale { "channel": string; "reaction": string; }; + "_soundSettings": { + "driveFile": string; + "driveFileWarn": string; + "driveFileTypeWarn": string; + "driveFileTypeWarnDescription": string; + "driveFileDurationWarn": string; + "driveFileDurationWarnDescription": string; + }; "_ago": { "future": string; "justNow": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 1f6695b3e..f4daefa97 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1852,6 +1852,14 @@ _sfx: channel: "チャンネル通知" reaction: "リアクション選択時" +_soundSettings: + driveFile: "ドライブの音声を使用" + driveFileWarn: "ドライブのファイルを選択してください" + driveFileTypeWarn: "このファイルは対応していません" + driveFileTypeWarnDescription: "音声ファイルを選択してください" + driveFileDurationWarn: "音声が長すぎます" + driveFileDurationWarnDescription: "長い音声を使用するとMisskeyの使用に支障をきたす可能性があります。それでも続行しますか?" + _ago: future: "未来" justNow: "たった今" diff --git a/packages/frontend/src/pages/settings/sounds.sound.vue b/packages/frontend/src/pages/settings/sounds.sound.vue index 08a923e10..2f4cd1be2 100644 --- a/packages/frontend/src/pages/settings/sounds.sound.vue +++ b/packages/frontend/src/pages/settings/sounds.sound.vue @@ -7,8 +7,12 @@ SPDX-License-Identifier: AGPL-3.0-only
- + +
+ {{ i18n.ts.selectFile }} +
{{ friendlyFileName }}
+
@@ -21,30 +25,149 @@ SPDX-License-Identifier: AGPL-3.0-only + + diff --git a/packages/frontend/src/pages/settings/sounds.vue b/packages/frontend/src/pages/settings/sounds.vue index 05e4b0d14..e549901f0 100644 --- a/packages/frontend/src/pages/settings/sounds.vue +++ b/packages/frontend/src/pages/settings/sounds.vue @@ -18,11 +18,11 @@ SPDX-License-Identifier: AGPL-3.0-only
- + - + - +
@@ -33,6 +33,8 @@ SPDX-License-Identifier: AGPL-3.0-only