fixing up the dialog class with other bug fixes

This commit is contained in:
MathMan05 2024-09-09 10:46:30 -05:00
parent b57988e734
commit 8e87635209
9 changed files with 55 additions and 66 deletions

View file

@ -1192,7 +1192,7 @@ class Localuser{
json.icon ? ["img", this.info.cdn+"/app-icons/" + appId + "/" + json.icon + ".png?size=128", [128, 128]] : ["text", "No icon"],
["fileupload", "Application icon:", event=>{
const reader=new FileReader();
reader.readAsDataURL(event.target.files[0]);
reader.readAsDataURL((event.target as HTMLInputElement).files[0]);
reader.onload=()=>{
fields.icon=reader.result;
};
@ -1280,7 +1280,7 @@ class Localuser{
fields.avatar ? ["img", fields.avatar, [128, 128]] : ["text", "No avatar"],
["fileupload", "Bot avatar:", event=>{
const reader=new FileReader();
reader.readAsDataURL(event.target.files[0]);
reader.readAsDataURL((event.target as HTMLInputElement).files[0]);
reader.onload=()=>{
fields.avatar=reader.result;
};