mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-27 06:29:19 +08:00
Update texture name when choosing file again
This commit is contained in:
parent
7dcc1eb87e
commit
e3e70a59e6
@ -156,7 +156,11 @@ function handleFiles(files, type) {
|
||||
img.onload = () => {
|
||||
|
||||
(type == "skin") ? MSP.changeSkin(img.src) : MSP.changeCape(img.src);
|
||||
$('#name').val($('#name').val() == "" ? file.name.split('.png')[0] : $('#name').val());
|
||||
let domTextureName = $('#name');
|
||||
if (domTextureName.val() === '' || domTextureName.val() === domTextureName.attr('data-last-file-name')) {
|
||||
domTextureName.attr('data-last-file-name', file.name);
|
||||
domTextureName.val(file.name);
|
||||
}
|
||||
};
|
||||
img.onerror = () => toastr.warning(trans('skinlib.fileExtError'));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user