pancy fants

This commit is contained in:
john 2025-05-06 12:53:32 +02:00
parent a4fd3a3556
commit b6633d6f25
15 changed files with 339 additions and 116 deletions

View file

@ -0,0 +1,14 @@
export function openFileDialog(accept: string, multiple: boolean): Promise<FileList | null> {
return new Promise((resolve) => {
const inputEl = document.createElement('input')
inputEl.type = 'file'
inputEl.accept = accept
inputEl.multiple = multiple
inputEl.addEventListener('change', () => {
resolve(inputEl.files)
})
inputEl.click()
})
}