1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-11-27 06:18:40 +09:00

enhance(frontend): カスタム絵文字管理画面にてファイル更新で勝手に名前が変わらないように (MisskeyIO#620)

This commit is contained in:
水咲(みさき) 2024-04-28 08:20:05 +09:00 committed by GitHub
parent 5fcec3d5dc
commit 59235a0e0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -165,6 +165,8 @@ const emit = defineEmits<{
async function changeImage(ev) {
file.value = await selectFile(ev.currentTarget ?? ev.target, null);
if (name.value) return;
const candidate = file.value.name.replace(/\.(.+)$/, '');
if (candidate.match(/^[a-z0-9_]+$/)) {
name.value = candidate;