web/dialogs: add picker dialog & clean up small dialog

This commit is contained in:
wukko
2024-07-22 14:33:43 +06:00
parent 24b783e5fb
commit 66bac03e30
11 changed files with 584 additions and 199 deletions

9
web/src/lib/download.ts Normal file
View File

@@ -0,0 +1,9 @@
import { device } from "$lib/device";
export const downloadFile = (url: string) => {
if (device.is.iOS) {
return navigator?.share({ url }).catch(() => {});
} else {
return window.open(url, "_blank");
}
};