Skip to content

Commit fc52f54

Browse files
committed
fix: アイコンデコレーション編集ページのファイル選択が機能していない問題を修正
1 parent 04e86c0 commit fc52f54

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/frontend/src/pages/avatar-decoration-edit-dialog.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ SPDX-License-Identifier: AGPL-3.0-only
2626
<MkAvatar style="width: 60px; height: 60px;" :user="$i" :decorations="url != '' ? [{ url }] : []" forceShowDecoration/>
2727
</div>
2828
</div>
29-
<MkButton rounded style="margin: 0 auto;" @click="selectImage(avatarDecoration, $event)">{{ i18n.ts.selectFile }}</MkButton>
29+
<MkButton rounded style="margin: 0 auto;" @click="selectImage($event)">{{ i18n.ts.selectFile }}</MkButton>
3030
<MkInput v-model="name">
3131
<template #label>{{ i18n.ts.name }}</template>
3232
</MkInput>
@@ -99,10 +99,10 @@ watch(roleIdsThatCanBeUsedThisDecoration, async () => {
9999
rolesThatCanBeUsedThisDecoration.value = (await Promise.all(roleIdsThatCanBeUsedThisDecoration.value.map((id) => misskeyApi('admin/roles/show', { roleId: id }).catch(() => null)))).filter(x => x != null);
100100
}, { immediate: true });
101101

102-
async function selectImage(decoration, ev) {
102+
async function selectImage(ev) {
103103
const file = await selectFile(ev.currentTarget ?? ev.target, null);
104-
decoration.name = file.name.replace(/\.(.+)$/, '');
105-
decoration.url = file.url;
104+
name.value = file.name.replace(/\.(.+)$/, '');
105+
url.value = file.url;
106106
}
107107

108108
async function addRole() {

0 commit comments

Comments
 (0)