forked from MapComplete/MapComplete
chore: automated housekeeping...
This commit is contained in:
parent
79b6927b56
commit
42ded4c1b1
328 changed files with 4062 additions and 1284 deletions
|
@ -30,7 +30,7 @@
|
|||
export let linkable = true
|
||||
let targetValue = Object.values(image.osmTags)[0]
|
||||
let isLinked = new UIEventSource(Object.values(tags.data).some((v) => targetValue === v))
|
||||
isLinked.addCallbackAndRun(linked => {
|
||||
isLinked.addCallbackAndRun((linked) => {
|
||||
if (linked) {
|
||||
MenuState.previewedImage.set(undefined)
|
||||
}
|
||||
|
@ -43,7 +43,7 @@
|
|||
provider: AllImageProviders.byName(image.provider),
|
||||
date: new Date(image.date),
|
||||
id: Object.values(image.osmTags)[0],
|
||||
isSpherical: image.details.isSpherical
|
||||
isSpherical: image.details.isSpherical,
|
||||
}
|
||||
|
||||
async function applyLink(isLinked: boolean) {
|
||||
|
@ -54,7 +54,7 @@
|
|||
if (isLinked) {
|
||||
const action = new LinkImageAction(currentTags.id, key, url, tags, {
|
||||
theme: tags.data._orig_theme ?? state.theme.id,
|
||||
changeType: "link-image"
|
||||
changeType: "link-image",
|
||||
})
|
||||
await state.changes.applyAction(action)
|
||||
} else {
|
||||
|
@ -63,7 +63,7 @@
|
|||
if (v === url) {
|
||||
const action = new ChangeTagAction(currentTags.id, new Tag(k, ""), currentTags, {
|
||||
theme: tags.data._orig_theme ?? state.theme.id,
|
||||
changeType: "remove-image"
|
||||
changeType: "remove-image",
|
||||
})
|
||||
state.changes.applyAction(action)
|
||||
}
|
||||
|
@ -99,9 +99,7 @@
|
|||
attributionFormat="minimal"
|
||||
>
|
||||
<svelte:fragment slot="dot-menu-actions">
|
||||
|
||||
<LoginToggle {state} silentFail={true} hiddenFail={true}>
|
||||
|
||||
{#if linkable}
|
||||
<label>
|
||||
<input bind:checked={$isLinked} type="checkbox" />
|
||||
|
@ -110,7 +108,6 @@
|
|||
{/if}
|
||||
</LoginToggle>
|
||||
</svelte:fragment>
|
||||
|
||||
</AttributedImage>
|
||||
<LoginToggle {state} silentFail={true}>
|
||||
{#if linkable}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue