web/PickerItem: add urlType to downloading params

This commit is contained in:
wukko 2024-09-23 15:18:20 +06:00
parent 402b4b6485
commit e0132ab928
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -14,6 +14,7 @@
export let number: number; export let number: number;
let imageLoaded = false; let imageLoaded = false;
const isTunnel = new URL(item.url).pathname === "/tunnel";
$: itemType = item.type ?? "photo"; $: itemType = item.type ?? "photo";
</script> </script>
@ -23,6 +24,7 @@
on:click={() => on:click={() =>
downloadFile({ downloadFile({
url: item.url, url: item.url,
urlType: isTunnel ? "tunnel" : "redirect",
})} })}
> >
<div class="picker-type"> <div class="picker-type">