mirror of
https://github.com/imputnet/cobalt.git
synced 2025-12-29 11:01:16 +00:00
web/dialogs: add picker dialog & clean up small dialog
This commit is contained in:
9
web/src/lib/download.ts
Normal file
9
web/src/lib/download.ts
Normal 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");
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user