forked from MapComplete/MapComplete
Chore: housekeeping, linting
This commit is contained in:
parent
f942529755
commit
30d00eb06d
74 changed files with 998 additions and 623 deletions
|
|
@ -39,16 +39,20 @@
|
|||
console.log(key, "-->", extraUrlParams[key])
|
||||
params.push(key + "=" + encodeURIComponent(extraUrlParams[key]))
|
||||
}
|
||||
let url = id.map((id) => {
|
||||
if (id) {
|
||||
return "#" + id
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
}).map(
|
||||
(id) =>
|
||||
`${window.location.protocol}//${window.location.host}${window.location.pathname}?${params.join("&")}${id}`
|
||||
)
|
||||
let url = id
|
||||
.map((id) => {
|
||||
if (id) {
|
||||
return "#" + id
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
})
|
||||
.map(
|
||||
(id) =>
|
||||
`${window.location.protocol}//${window.location.host}${
|
||||
window.location.pathname
|
||||
}?${params.join("&")}${id}`
|
||||
)
|
||||
|
||||
function toggleSize() {
|
||||
if (size.data !== bigSize) {
|
||||
|
|
@ -58,26 +62,27 @@
|
|||
}
|
||||
}
|
||||
|
||||
let sideTextSub = (tags ?? new ImmutableStore({})).map(tgs => Utils.SubstituteKeys(sideText, tgs))
|
||||
let sideTextSub = (tags ?? new ImmutableStore({})).map((tgs) =>
|
||||
Utils.SubstituteKeys(sideText, tgs)
|
||||
)
|
||||
</script>
|
||||
|
||||
{#if $id?.startsWith("node/-")}
|
||||
<!-- Not yet uploaded, doesn't have a fixed ID -->
|
||||
<Loading />
|
||||
{:else}
|
||||
<div class="flex flex-col my-4">
|
||||
|
||||
<div class="flex w-full items-center ">
|
||||
<img
|
||||
class="shrink-0"
|
||||
on:click={() => toggleSize()}
|
||||
src={new Qr($url).toImageElement($size)}
|
||||
style={`width: ${$size}px; height: ${$size}px`}
|
||||
/>
|
||||
{#if sideText}
|
||||
<div class={sideTextClass}>{ $sideTextSub}</div>
|
||||
{/if}
|
||||
<div class="my-4 flex flex-col">
|
||||
<div class="flex w-full items-center">
|
||||
<img
|
||||
class="shrink-0"
|
||||
on:click={() => toggleSize()}
|
||||
src={new Qr($url).toImageElement($size)}
|
||||
style={`width: ${$size}px; height: ${$size}px`}
|
||||
/>
|
||||
{#if sideText}
|
||||
<div class={sideTextClass}>{$sideTextSub}</div>
|
||||
{/if}
|
||||
</div>
|
||||
<a href={$url} target="_blank" class="subtle text-sm ">{$url}</a>
|
||||
<a href={$url} target="_blank" class="subtle text-sm">{$url}</a>
|
||||
</div>
|
||||
{/if}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue