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:
parent
5fcec3d5dc
commit
59235a0e0e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user