From ec799fb6ef7e300de108de8762ad4fffd949203a 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: Fri, 6 Sep 2024 15:37:03 +0900 Subject: [PATCH] =?UTF-8?q?enhance(frontend):=20=E3=82=A2=E3=82=A4?= =?UTF-8?q?=E3=82=B3=E3=83=B3=E3=83=87=E3=82=B3=E3=83=AC=E3=83=BC=E3=82=B7?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E7=AE=A1=E7=90=86=E7=94=BB=E9=9D=A2=E3=81=AB?= =?UTF-8?q?=E3=83=97=E3=83=AC=E3=83=93=E3=83=A5=E3=83=BC=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=20(#14511)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * enhance(frontend): アイコンデコレーション管理画面にプレビューを追加 * Update Changelog * tweak --- CHANGELOG.md | 4 +- .../frontend/src/pages/avatar-decorations.vue | 109 +++++++++++------- 2 files changed, 70 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66f3fd12f4..d538d6c634 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,9 @@ - ### Client -- +- サイズ制限を超過するファイルをアップロードしようとした際にエラーを出すように +- Enhance: アイコンデコレーション管理画面にプレビューを追加 +- Fix: サーバーメトリクスが2つ以上あるとリロード直後の表示がおかしくなる問題を修正 ### Server - Fix: WSの`readAllNotifications` メッセージが `body` を持たない場合に動作しない問題 #14374 diff --git a/packages/frontend/src/pages/avatar-decorations.vue b/packages/frontend/src/pages/avatar-decorations.vue index 20bdd36e67..bd1e6b4617 100644 --- a/packages/frontend/src/pages/avatar-decorations.vue +++ b/packages/frontend/src/pages/avatar-decorations.vue @@ -12,27 +12,31 @@ SPDX-License-Identifier: AGPL-3.0-only -
- - - - - - -
-

{{ i18n.ts.image }}

- {{ i18n.ts.selectFile }} -
- - - -
- - -
-
- {{ i18n.ts.save }} - {{ i18n.ts.delete }} +
+
+
+
+ +
+
+ +
+
+
+ + + + + + + + + +
+ {{ i18n.ts.save }} + {{ i18n.ts.delete }} +
+
@@ -47,6 +51,7 @@ import * as Misskey from 'cherrypick-js'; import MkButton from '@/components/MkButton.vue'; import MkInput from '@/components/MkInput.vue'; import MkTextarea from '@/components/MkTextarea.vue'; +import { signinRequired } from '@/account.js'; import * as os from '@/os.js'; import { misskeyApi } from '@/scripts/misskey-api.js'; import { i18n } from '@/i18n.js'; @@ -56,6 +61,8 @@ import { selectFile } from '@/scripts/select-file.js'; const avatarDecorations = ref([]); +const $i = signinRequired(); + async function changeImage(ev, avatarDecoration) { const file = await selectFile(ev.currentTarget ?? ev.target, null); if (file != null) { @@ -117,35 +124,53 @@ definePageMetadata(() => ({