From d2ae80dd210866f3ebff49351ae1aaa7eb30df2b Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 22 Sep 2023 21:09:14 +0900 Subject: [PATCH 01/13] =?UTF-8?q?fix(frontend):=20=E3=83=AA=E3=82=A2?= =?UTF-8?q?=E3=82=AF=E3=82=B7=E3=83=A7=E3=83=B3=E4=B8=80=E8=A6=A7=E3=81=8C?= =?UTF-8?q?=E7=A8=AE=E5=88=A5=E3=81=94=E3=81=A8=E3=81=AB=E3=83=95=E3=82=A3?= =?UTF-8?q?=E3=83=AB=E3=82=BF=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #11865 --- packages/frontend/src/components/MkNoteDetailed.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index 0bcf98cca2..94c6833b14 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -158,11 +158,13 @@ SPDX-License-Identifier: AGPL-3.0-only {{ appearNote.reactions[reaction] }} - + From 3085739e0ef17b0b1c38940adfd760089bd96ff3 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 22 Sep 2023 21:10:54 +0900 Subject: [PATCH 02/13] :art: Resolve #11867 --- packages/frontend/src/components/MkNote.vue | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index 0bc94f5bd2..b397f3eee9 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -938,9 +938,6 @@ function readPromo() { height: 32px; margin: 2px; padding: 0 6px; - border: dashed 1px var(--divider); - border-radius: 4px; - background: transparent; opacity: .8; } From 1924bd20bb294bf2fdec6df922b3ec663102ae7c 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: Sat, 23 Sep 2023 09:08:14 +0900 Subject: [PATCH 03/13] =?UTF-8?q?enhance(frontend):=20=E3=83=97=E3=83=A9?= =?UTF-8?q?=E3=82=B0=E3=82=A4=E3=83=B3=E3=81=AE=E3=82=BD=E3=83=BC=E3=82=B9?= =?UTF-8?q?=E3=82=B3=E3=83=BC=E3=83=89=E3=82=92=E7=A2=BA=E8=AA=8D=E3=83=BB?= =?UTF-8?q?=E3=82=B3=E3=83=94=E3=83=BC=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=20(#11873)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * (add) plugin: view and copy source code * (fix) plugin permission ui * Update Changelog --- CHANGELOG.md | 2 + locales/index.d.ts | 1 + locales/ja-JP.yml | 1 + .../frontend/src/pages/settings/plugin.vue | 61 ++++++++++++++----- packages/frontend/src/store.ts | 3 + 5 files changed, 52 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6c66f0859..7c4134bdef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,6 +67,7 @@ - Enhance: ノート詳細ページ読み込み時のパフォーマンスが向上しました - Enhance: タイムラインでリスト/アンテナ選択時のパフォーマンスを改善 - Enhance: 「Moderation note」、「Add moderation note」をローカライズできるように +- Enhance: プラグインのソースコードを確認・コピーできるように - Enhance: 細かなデザインの調整 - Fix: サーバー情報画面(`/instance-info/{domain}`)でブロックができないのを修正 - Fix: 未読のお知らせの「わかった」をクリック・タップしてもその場で「わかった」が消えない問題を修正 @@ -76,6 +77,7 @@ - Fix: Misskeyプラグインをインストールする際のAiScriptバージョンのチェックが0.14.0以降に対応していない問題を修正 - Fix: 他のサーバーのユーザーへ「メッセージを送信」した時の初期テキストのメンションが間違っている問題を修正 - Fix: 環境によってはMisskey Webが開けない問題を修正 +- Fix: プラグインの権限リストが見れない問題を修正 ### Server - Change: cacheRemoteFilesの初期値はfalseになりました diff --git a/locales/index.d.ts b/locales/index.d.ts index f6b6daae89..256f178124 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1632,6 +1632,7 @@ export interface Locale { "install": string; "installWarn": string; "manage": string; + "viewSource": string; }; "_preferencesBackups": { "list": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 82ced0aa3b..90d025d80f 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1549,6 +1549,7 @@ _plugin: install: "プラグインのインストール" installWarn: "信頼できないプラグインはインストールしないでください。" manage: "プラグインの管理" + viewSource: "ソースを表示" _preferencesBackups: list: "作成したバックアップ" diff --git a/packages/frontend/src/pages/settings/plugin.vue b/packages/frontend/src/pages/settings/plugin.vue index e9bc8573b3..4a2d8d600e 100644 --- a/packages/frontend/src/pages/settings/plugin.vue +++ b/packages/frontend/src/pages/settings/plugin.vue @@ -10,28 +10,49 @@ SPDX-License-Identifier: AGPL-3.0-only
-
- {{ plugin.name }}v{{ plugin.version }} +
+
+ {{ plugin.name }}v{{ plugin.version }} + {{ i18n.ts.makeActive }} +
- {{ i18n.ts.makeActive }} - - - - - - - - - - - - - +
+ + + + + + + + + + + + +
{{ i18n.ts.settings }} {{ i18n.ts.uninstall }}
+ + + + + +
+
+ {{ i18n.ts.copy }} +
+ + +
+
@@ -44,8 +65,11 @@ import FormLink from '@/components/form/link.vue'; import MkSwitch from '@/components/MkSwitch.vue'; import FormSection from '@/components/form/section.vue'; import MkButton from '@/components/MkButton.vue'; +import MkCode from '@/components/MkCode.vue'; +import MkFolder from '@/components/MkFolder.vue'; import MkKeyValue from '@/components/MkKeyValue.vue'; import * as os from '@/os.js'; +import copyToClipboard from '@/scripts/copy-to-clipboard.js'; import { ColdDeviceStorage } from '@/store.js'; import { unisonReload } from '@/scripts/unison-reload.js'; import { i18n } from '@/i18n.js'; @@ -61,6 +85,11 @@ function uninstall(plugin) { }); } +function copy(plugin) { + copyToClipboard(plugin.src ?? ''); + os.success(); +} + // TODO: この処理をstore側にactionとして移動し、設定画面を開くAiScriptAPIを実装できるようにする async function config(plugin) { const config = plugin.config; diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index 16483f0cf7..8a7ee62eff 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -381,6 +381,9 @@ export type Plugin = { src: string | null; version: string; ast: any[]; + author?: string; + description?: string; + permissions?: string[]; }; interface Watcher { From 98209be01ae4ec408e84df41c8c6f9d270792b68 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 23 Sep 2023 09:37:26 +0900 Subject: [PATCH 04/13] Update ja-JP.yml Fix #11870 --- locales/ja-JP.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 82ced0aa3b..287895959c 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -2080,6 +2080,7 @@ _notification: _types: all: "すべて" + note: "ユーザーの新規投稿" follow: "フォロー" mention: "メンション" reply: "リプライ" From e8a098af62c7bd2f9953a814f7c43a64e6602343 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 23 Sep 2023 09:59:45 +0900 Subject: [PATCH 05/13] Update index.d.ts --- locales/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/locales/index.d.ts b/locales/index.d.ts index 256f178124..dbd485379f 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -2166,6 +2166,7 @@ export interface Locale { "notificationWillBeDisplayedLikeThis": string; "_types": { "all": string; + "note": string; "follow": string; "mention": string; "reply": string; From ad8ddbf12f9750446bb46cdb9a671f069f5bfd9f Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 23 Sep 2023 09:59:50 +0900 Subject: [PATCH 06/13] :art: --- packages/frontend/src/components/MkNoteDetailed.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index 94c6833b14..2b61240b96 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -143,7 +143,7 @@ SPDX-License-Identifier: AGPL-3.0-only
- +