mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 12:50:01 +00:00
web/PickerItem: add urlType
to downloading params
This commit is contained in:
parent
402b4b6485
commit
e0132ab928
1 changed files with 2 additions and 0 deletions
|
@ -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">
|
||||||
|
|
Loading…
Reference in a new issue