1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-15 01:05:42 +02:00

fix(frontend): ドライブへの画像アップロード時にファイル名の変更が無視される不具合を修正 (#17302)

* ドライブの実ファイル名ではなくsuffixを保持するように

* MkUploaderItemsでファイル名が圧縮後の拡張子も含めて表示されるように

* Apply suggestion from @kakkokari-gtyih

Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>

* changelog

---------

Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
FINEARCHS
2026-04-11 14:23:42 +09:00
committed by GitHub
parent 3cb003366f
commit 68e3476a16
3 changed files with 17 additions and 7 deletions

View File

@@ -24,7 +24,10 @@ SPDX-License-Identifier: AGPL-3.0-only
<div :class="$style.itemBody">
<div>
<i v-if="item.isSensitive" style="color: var(--MI_THEME-warn); margin-right: 0.5em;" class="ti ti-eye-exclamation"></i>
<MkCondensedLine :minScale="2 / 3">{{ item.name }}</MkCondensedLine>
<MkCondensedLine :minScale="2 / 3">
<span>{{ getUploadName(item).lastIndexOf('.') != -1 ? getUploadName(item).substring(0, getUploadName(item).lastIndexOf('.')) : getUploadName(item) }}</span>
<span v-if="getUploadName(item).lastIndexOf('.') != -1" style="opacity: 0.5;">{{ getUploadName(item).substring(getUploadName(item).lastIndexOf('.')) }}</span>
</MkCondensedLine>
</div>
<div :class="$style.itemInfo">
<span>{{ item.file.type }}</span>
@@ -47,6 +50,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup>
import { isLink } from '@@/js/is-link.js';
import { getUploadName } from '@/composables/use-uploader.js';
import type { UploaderItem } from '@/composables/use-uploader.js';
import { i18n } from '@/i18n.js';
import MkButton from '@/components/MkButton.vue';