{#if $license.title}
{#if $license.informationLocation}
-
{$license.title}
+
{$license.title}
{:else}
$license.title
{/if}
diff --git a/src/UI/InputElement/InputHelper.svelte b/src/UI/InputElement/InputHelper.svelte
index 27bc2bfdf..154149b49 100644
--- a/src/UI/InputElement/InputHelper.svelte
+++ b/src/UI/InputElement/InputHelper.svelte
@@ -18,6 +18,7 @@
import DateInput from "./Helpers/DateInput.svelte"
import ColorInput from "./Helpers/ColorInput.svelte"
import OpeningHoursInput from "./Helpers/OpeningHoursInput.svelte"
+ import SlopeInput from "./Helpers/SlopeInput.svelte"
export let type: ValidatorType
export let value: UIEventSource
@@ -47,6 +48,8 @@
{:else if type === "opening_hours"}
+{:else if type === "slope"}
+
{:else if type === "wikidata"}
InputHelpers.constructWikidataHelper(value, properties)} />
{/if}
diff --git a/src/UI/Popup/MarkAsFavouriteMini.svelte b/src/UI/Popup/MarkAsFavouriteMini.svelte
index b8d242aac..1f880690e 100644
--- a/src/UI/Popup/MarkAsFavouriteMini.svelte
+++ b/src/UI/Popup/MarkAsFavouriteMini.svelte
@@ -1,36 +1,39 @@
{#if $isFavourite}
-
diff --git a/src/UI/SpecialVisualizations.ts b/src/UI/SpecialVisualizations.ts
index 1cf93abd0..45afaf86d 100644
--- a/src/UI/SpecialVisualizations.ts
+++ b/src/UI/SpecialVisualizations.ts
@@ -45,7 +45,6 @@ import { GeoOperations } from "../Logic/GeoOperations"
import CreateNewNote from "./Popup/CreateNewNote.svelte"
import AddNewPoint from "./Popup/AddNewPoint/AddNewPoint.svelte"
import UserProfile from "./BigComponents/UserProfile.svelte"
-import Link from "./Base/Link"
import LayerConfig from "../Models/ThemeConfig/LayerConfig"
import TagRenderingConfig from "../Models/ThemeConfig/TagRenderingConfig"
import { WayId } from "../Models/OsmFeature"
@@ -81,9 +80,9 @@ import MarkAsFavouriteMini from "./Popup/MarkAsFavouriteMini.svelte"
import NextChangeViz from "./OpeningHours/NextChangeViz.svelte"
import NearbyImages from "./Image/NearbyImages.svelte"
import NearbyImagesCollapsed from "./Image/NearbyImagesCollapsed.svelte"
-import { svelte } from "@sveltejs/vite-plugin-svelte"
import MoveWizard from "./Popup/MoveWizard.svelte"
import { Unit } from "../Models/Unit"
+import Link from "./Base/Link.svelte"
class NearbyImageVis implements SpecialVisualization {
// Class must be in SpecialVisualisations due to weird cyclical import that breaks the tests
@@ -1288,6 +1287,10 @@ export default class SpecialVisualizations {
name: "download",
doc: "If set, this link will act as a download-button. The contents of `href` will be offered for download; this parameter will act as the proposed filename",
},
+ {
+ name: "arialabel",
+ doc: "If set, this text will be used as aria-label",
+ },
],
needsUrls: [],
constr(
@@ -1295,15 +1298,19 @@ export default class SpecialVisualizations {
tagSource: UIEventSource>,
args: string[]
): BaseUIElement {
- const [text, href, classnames, download] = args
+ const [text, href, classnames, download, ariaLabel] = args
+ const newTab = download === undefined && !href.startsWith("#")
return new VariableUiElement(
- tagSource.map((tags) =>
- new Link(
- Utils.SubstituteKeys(text, tags),
- Utils.SubstituteKeys(href, tags),
- download === undefined && !href.startsWith("#"),
- Utils.SubstituteKeys(download, tags)
- ).SetClass(classnames)
+ tagSource.map(
+ (tags) =>
+ new SvelteUIElement(Link, {
+ text: Utils.SubstituteKeys(text, tags),
+ href: Utils.SubstituteKeys(href, tags),
+ classnames,
+ download: Utils.SubstituteKeys(download, tags),
+ ariaLabel: Utils.SubstituteKeys(ariaLabel, tags),
+ newTab,
+ })
)
)
},
@@ -1422,12 +1429,11 @@ export default class SpecialVisualizations {
const [_, username, host] = fediAccount.match(
FediverseValidator.usernameAtServer
)
-
- return new Link(
- fediAccount,
- "https://" + host + "/@" + username,
- true
- )
+ return new SvelteUIElement(Link, {
+ text: fediAccount,
+ url: "https://" + host + "/@" + username,
+ newTab: true,
+ })
})
)
},
diff --git a/src/UI/Test.svelte b/src/UI/Test.svelte
index ac4f5dde9..8d1c7b4d9 100644
--- a/src/UI/Test.svelte
+++ b/src/UI/Test.svelte
@@ -1,5 +1,11 @@
-No tests
+
+
diff --git a/src/UI/ThemeViewGUI.svelte b/src/UI/ThemeViewGUI.svelte
index 1ffaf0e24..5f3318018 100644
--- a/src/UI/ThemeViewGUI.svelte
+++ b/src/UI/ThemeViewGUI.svelte
@@ -64,10 +64,10 @@
import Share from "../assets/svg/Share.svelte"
import Favourites from "./Favourites/Favourites.svelte"
import ImageOperations from "./Image/ImageOperations.svelte"
+ import { ariaLabel } from "../Utils/ariaLabel"
export let state: ThemeViewState
let layout = state.layout
-
let maplibremap: UIEventSource = state.map
let selectedElement: UIEventSource = new UIEventSource(undefined)
@@ -142,7 +142,8 @@