From f4bca4708eba50cdef4127c74a37678ac25747c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8A=E3=81=95=E3=82=80=E3=81=AE=E3=81=B2=E3=81=A8?= <46447427+samunohito@users.noreply.github.com> Date: Sun, 26 Jan 2025 14:59:03 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat(frontend):=20=E3=83=AA=E3=83=A2?= =?UTF-8?q?=E3=83=BC=E3=83=88=E7=B5=B5=E6=96=87=E5=AD=97=E3=81=AE=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=83=9D=E3=83=BC=E3=83=88=E6=99=82=E3=81=AB=E8=A9=B3?= =?UTF-8?q?=E7=B4=B0=E3=82=92=E7=A2=BA=E8=AA=8D=E3=81=A7=E3=81=8D=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=20(#15344)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(frontend): リモート絵文字のインポート時に詳細を確認できるように * 追加対応 * MkInput -> MkKeyValue --- CHANGELOG.md | 1 + locales/index.d.ts | 4 + locales/ja-JP.yml | 1 + .../components/MkRemoteEmojiEditDialog.vue | 132 ++++++++++++++++++ .../admin/custom-emojis-manager.remote.vue | 48 ++++++- .../src/pages/custom-emojis-manager.vue | 18 +++ 6 files changed, 202 insertions(+), 2 deletions(-) create mode 100644 packages/frontend/src/components/MkRemoteEmojiEditDialog.vue diff --git a/CHANGELOG.md b/CHANGELOG.md index 57d8a528f3..7339dbd3ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ (Based on https://github.com/Otaku-Social/maniakey/pull/14) - Enhance: AiScriptの拡張API関数において引数の型チェックをより厳格に - Enhance: クエリパラメータでuiを一時的に変更できるように #15240 +- Enhance: リモート絵文字のインポート時に詳細を確認できるように #15336 - Fix: 画面サイズが変わった際にナビゲーションバーが自動で折りたたまれない問題を修正 - Fix: サーバー情報メニューに区切り線が不足していたのを修正 - Fix: ノートがログインしているユーザーしか見れない場合にログインダイアログを閉じるとその後の動線がなくなる問題を修正 diff --git a/locales/index.d.ts b/locales/index.d.ts index b98fd5d423..83159337ae 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -10635,6 +10635,10 @@ export interface Locale extends ILocale { "logNothing": string; }; "_remote": { + /** + * 選択行の詳細 + */ + "selectionRowDetail": string; /** * 選択行をインポート */ diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 638f2a69c3..42c25a58a6 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -2837,6 +2837,7 @@ _customEmojisManager: failureLogNothing: "失敗ログはありません。" logNothing: "ログはありません。" _remote: + selectionRowDetail: "選択行の詳細" importSelectionRows: "選択行をインポート" importSelectionRangesRows: "選択範囲の行をインポート" importEmojisButton: "チェックされた絵文字をインポート" diff --git a/packages/frontend/src/components/MkRemoteEmojiEditDialog.vue b/packages/frontend/src/components/MkRemoteEmojiEditDialog.vue new file mode 100644 index 0000000000..873b276b3d --- /dev/null +++ b/packages/frontend/src/components/MkRemoteEmojiEditDialog.vue @@ -0,0 +1,132 @@ + + + + + :{{ name }}: + + + + + + + + + + + + + + + + + + + + + {{ i18n.ts.id }} + {{ name }} + + + {{ i18n.ts.host }} + {{ host }} + + + {{ i18n.ts.license }} + {{ license }} + + + + + + {{ i18n.ts.import }} + + + + + + + + + diff --git a/packages/frontend/src/pages/admin/custom-emojis-manager.remote.vue b/packages/frontend/src/pages/admin/custom-emojis-manager.remote.vue index 9a9d2990ba..14a3b71e53 100644 --- a/packages/frontend/src/pages/admin/custom-emojis-manager.remote.vue +++ b/packages/frontend/src/pages/admin/custom-emojis-manager.remote.vue @@ -34,6 +34,16 @@ SPDX-License-Identifier: AGPL-3.0-only > host + + license + + import { computed, onMounted, ref, useCssModule } from 'vue'; import * as Misskey from 'misskey-js'; +import MkRemoteEmojiEditDialog from '@/components/MkRemoteEmojiEditDialog.vue'; import { misskeyApi } from '@/scripts/misskey-api.js'; import { i18n } from '@/i18n.js'; import MkButton from '@/components/MkButton.vue'; @@ -135,7 +146,7 @@ import { deviceKind } from '@/scripts/device-kind.js'; import MkPagingButtons from '@/components/MkPagingButtons.vue'; import MkSortOrderEditor from '@/components/MkSortOrderEditor.vue'; import { SortOrder } from '@/components/MkSortOrderEditor.define.js'; -import { useLoading } from "@/components/hook/useLoading.js"; +import { useLoading } from '@/components/hook/useLoading.js'; type GridItem = { checked: boolean; @@ -178,12 +189,37 @@ function setupGrid(): GridSetting { { bindTo: 'url', icon: 'ti-icons', type: 'image', editable: false, width: 'auto' }, { bindTo: 'name', title: 'name', type: 'text', editable: false, width: 'auto' }, { bindTo: 'host', title: 'host', type: 'text', editable: false, width: 'auto' }, + { bindTo: 'license', title: 'license', type: 'text', editable: false, width: 200 }, { bindTo: 'uri', title: 'uri', type: 'text', editable: false, width: 'auto' }, { bindTo: 'publicUrl', title: 'publicUrl', type: 'text', editable: false, width: 'auto' }, ], cells: { contextMenuFactory: (col, row, value, context) => { return [ + { + type: 'button', + text: i18n.ts._customEmojisManager._remote.selectionRowDetail, + icon: 'ti ti-info-circle', + action: async () => { + const target = customEmojis.value[row.index]; + const { dispose } = os.popup(MkRemoteEmojiEditDialog, { + emoji: { + id: target.id, + name: target.name, + host: target.host!, + license: target.license, + url: target.publicUrl, + }, + }, { + done: () => { + dispose(); + }, + closed: () => { + dispose(); + }, + }); + }, + }, { type: 'button', text: i18n.ts._customEmojisManager._remote.importSelectionRangesRows, @@ -207,6 +243,7 @@ const currentPage = ref(0); const queryName = ref(null); const queryHost = ref(null); +const queryLicense = ref(null); const queryUri = ref(null); const queryPublicUrl = ref(null); const previousQuery = ref(undefined); @@ -229,6 +266,7 @@ async function onSearchRequest() { function onQueryResetButtonClicked() { queryName.value = null; queryHost.value = null; + queryLicense.value = null; queryUri.value = null; queryPublicUrl.value = null; } @@ -306,6 +344,7 @@ async function refreshCustomEmojis() { const query: Misskey.entities.V2AdminEmojiListRequest['query'] = { name: emptyStrToUndefined(queryName.value), host: emptyStrToUndefined(queryHost.value), + license: emptyStrToUndefined(queryLicense.value), uri: emptyStrToUndefined(queryUri.value), publicUrl: emptyStrToUndefined(queryPublicUrl.value), hostType: 'remote', @@ -330,6 +369,7 @@ async function refreshCustomEmojis() { id: it.id, url: it.publicUrl, name: it.name, + license: it.license, host: it.host!, })); } @@ -356,6 +396,10 @@ onMounted(async () => { grid-column: 2 / 3; } +.col3 { + grid-column: 3 / 4; +} + .root { padding: 16px; } @@ -366,7 +410,7 @@ onMounted(async () => { .searchArea { display: grid; - grid-template-columns: 1fr 1fr; + grid-template-columns: 1fr 1fr 1fr; gap: 16px; } diff --git a/packages/frontend/src/pages/custom-emojis-manager.vue b/packages/frontend/src/pages/custom-emojis-manager.vue index 789a63eb90..82c6d8df4e 100644 --- a/packages/frontend/src/pages/custom-emojis-manager.vue +++ b/packages/frontend/src/pages/custom-emojis-manager.vue @@ -78,6 +78,7 @@ import { computed, defineAsyncComponent, ref, shallowRef } from 'vue'; import MkButton from '@/components/MkButton.vue'; import MkInput from '@/components/MkInput.vue'; import MkPagination from '@/components/MkPagination.vue'; +import MkRemoteEmojiEditDialog from '@/components/MkRemoteEmojiEditDialog.vue'; import MkSwitch from '@/components/MkSwitch.vue'; import FormSplit from '@/components/form/split.vue'; import { selectFile } from '@/scripts/select-file.js'; @@ -159,6 +160,19 @@ const edit = (emoji) => { }); }; +const detailRemoteEmoji = (emoji) => { + const { dispose } = os.popup(MkRemoteEmojiEditDialog, { + emoji: emoji, + }, { + done: () => { + dispose(); + }, + closed: () => { + dispose(); + }, + }); +}; + const importEmoji = (emoji) => { os.apiWithDialog('admin/emoji/copy', { emojiId: emoji.id, @@ -169,6 +183,10 @@ const remoteMenu = (emoji, ev: MouseEvent) => { os.popupMenu([{ type: 'label', text: ':' + emoji.name + ':', + }, { + text: i18n.ts.details, + icon: 'ti ti-info-circle', + action: () => { detailRemoteEmoji(emoji); }, }, { text: i18n.ts.import, icon: 'ti ti-plus', From ef29130057e08e3c2b51625671d8cdfd495f6d08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A5=BA=E5=AD=90w=20=28Yumechi=29?= <35571479+eternal-flame-AD@users.noreply.github.com> Date: Sun, 26 Jan 2025 06:03:42 +0000 Subject: [PATCH 2/3] =?UTF-8?q?fix(backend):=20=E3=83=8E=E3=83=BC=E3=83=88?= =?UTF-8?q?=E3=81=AE=E9=96=B2=E8=A6=A7=E3=81=AB=E3=83=AD=E3=82=B0=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E5=BF=85=E9=A0=88=E3=81=AB=E3=81=97=E3=81=A6=E3=82=82?= =?UTF-8?q?Feed=E3=81=A7=E3=83=8E=E3=83=BC=E3=83=88=E3=81=8C=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E3=81=95=E3=82=8C=E3=81=A6=E3=81=97=E3=81=BE=E3=81=86?= =?UTF-8?q?=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3=20(#15083)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: eternal-flame-AD Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com> --- CHANGELOG.md | 1 + packages/backend/src/server/web/ClientServerService.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7339dbd3ff..8536c1a4ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,7 @@ - Fix: ユーザーのプロフィール画面をアドレス入力などで直接表示した際に概要タブの描画に失敗する問題の修正( #15032 ) - Fix: 起動前の疎通チェックが機能しなくなっていた問題を修正 (Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/737) +- Fix: ノートの閲覧にログイン必須にしてもFeedでノートが表示されてしまう問題を修正 - Fix: 絵文字の連合でライセンス欄を相互にやり取りするように ( #10859, #14109 ) - Fix: ロックダウンされた期間指定のノートがStreaming経由でLTLに出現するのを修正 ( #15200 ) - Fix: disableClustering設定時の初期化ロジックを調整( #15223 ) diff --git a/packages/backend/src/server/web/ClientServerService.ts b/packages/backend/src/server/web/ClientServerService.ts index d450c3fb01..4c884dd314 100644 --- a/packages/backend/src/server/web/ClientServerService.ts +++ b/packages/backend/src/server/web/ClientServerService.ts @@ -512,6 +512,7 @@ export class ClientServerService { usernameLower: username.toLowerCase(), host: host ?? IsNull(), isSuspended: false, + requireSigninToViewContents: false, }); return user && await this.feedService.packFeed(user); From 791b4500ec405446785acdc6d10c41acd9d2583c 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: Sun, 26 Jan 2025 15:07:12 +0900 Subject: [PATCH 3/3] =?UTF-8?q?fix(frontend):=20=E7=94=BB=E9=9D=A2?= =?UTF-8?q?=E3=82=92=E9=96=89=E3=81=98=E3=82=8B=E7=9B=B4=E5=89=8D=E3=81=AB?= =?UTF-8?q?AudioContext=E3=82=92=E9=96=89=E3=81=98=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=20(#15080)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(frontend): 画面を閉じる直前にAudioContextを閉じるように * Update Changelog * Update CHANGELOG.md --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com> --- CHANGELOG.md | 1 + packages/frontend/src/scripts/sound.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8536c1a4ef..59fd861ec4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ (Cherry-picked from https://github.com/TeamNijimiss/misskey/commit/800359623e41a662551d774de15b0437b6849bb4) - Fix: ノート作成画面でファイルの添付可能個数を超えてもノートボタンが押せていた問題を修正 - Fix: 「アカウントを管理」画面で、ユーザー情報の取得に失敗したアカウント(削除されたアカウントなど)が表示されない問題を修正 +- Fix: MacOSでChrome系ブラウザを使用している場合に、Misskeyを閉じた際に他のタブのオーディオ機能と干渉する問題を修正 - Fix: 言語データのキャッシュ状況によっては、埋め込みウィジェットが正しく起動しない問題を修正 - Fix: 「削除して編集」でノートの引用を解除出来なかった問題を修正( #14476 ) - Fix: RSSウィジェットが正しく表示されない問題を修正 diff --git a/packages/frontend/src/scripts/sound.ts b/packages/frontend/src/scripts/sound.ts index 05f82fce7d..2008afe045 100644 --- a/packages/frontend/src/scripts/sound.ts +++ b/packages/frontend/src/scripts/sound.ts @@ -93,6 +93,10 @@ export async function loadAudio(url: string, options?: { useCache?: boolean; }) // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition if (ctx == null) { ctx = new AudioContext(); + + window.addEventListener('beforeunload', () => { + ctx.close(); + }); } if (options?.useCache ?? true) { if (cache.has(url)) {