forked from mirrors/homebox
feat: init tools page (#271)
This commit is contained in:
parent
ab22ea6a25
commit
6ff2d64996
7 changed files with 194 additions and 129 deletions
|
@ -53,11 +53,16 @@
|
|||
);
|
||||
|
||||
function setFile(e: Event) {
|
||||
importCsv.value = e.target.files[0];
|
||||
const result = e.target as HTMLInputElement;
|
||||
if (!result.files || result.files.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
importCsv.value = result.files[0];
|
||||
}
|
||||
|
||||
function uploadCsv() {
|
||||
importRef.value.click();
|
||||
importRef.value?.click();
|
||||
}
|
||||
|
||||
const eventBus = useEventBus();
|
||||
|
@ -86,5 +91,7 @@
|
|||
}
|
||||
|
||||
eventBus.emit(EventTypes.InvalidStores);
|
||||
|
||||
toast.success("Import successful!");
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue