2023-12-20 02:49:34 +01:00
|
|
|
<script lang="ts">
|
|
|
|
|
import Tr from "../Base/Tr.svelte"
|
|
|
|
|
import Translations from "../i18n/Translations"
|
2024-05-10 01:45:08 +02:00
|
|
|
import TagRenderingEditable from "../Popup/TagRendering/TagRenderingEditable.svelte"
|
|
|
|
|
import type { SpecialVisualizationState } from "../SpecialVisualization"
|
|
|
|
|
import UserRelatedState from "../../Logic/State/UserRelatedState"
|
2025-02-28 19:36:13 +01:00
|
|
|
import type { Feature } from "geojson"
|
2025-06-18 22:31:50 +02:00
|
|
|
import { ImmutableStore } from "../../Logic/UIEventSource"
|
2023-12-20 02:49:34 +01:00
|
|
|
|
|
|
|
|
const t = Translations.t.privacy
|
2025-06-18 22:31:50 +02:00
|
|
|
export let state: Partial<SpecialVisualizationState>
|
2024-05-10 01:45:08 +02:00
|
|
|
const usersettings = UserRelatedState.usersettingsConfig
|
2024-06-16 16:06:26 +02:00
|
|
|
const editPrivacy = usersettings.tagRenderings.find((tr) => tr.id === "more_privacy")
|
2025-02-28 13:37:58 +01:00
|
|
|
const editThemeHistory = usersettings.tagRenderings.find((tr) => tr.id === "sync-visited-themes")
|
2025-02-28 19:36:13 +01:00
|
|
|
const editReviews = usersettings.tagRenderings.find((tr) => tr.id === "mangrove-reviews-allowed")
|
2025-02-28 13:37:58 +01:00
|
|
|
|
2025-03-06 16:21:55 +01:00
|
|
|
const editLocationHistory = usersettings.tagRenderings.find(
|
|
|
|
|
(tr) => tr.id === "sync-visited-locations"
|
|
|
|
|
)
|
2025-02-28 13:37:58 +01:00
|
|
|
|
2025-02-28 19:36:13 +01:00
|
|
|
const selectedElement: Feature = {
|
|
|
|
|
type: "Feature",
|
|
|
|
|
properties: { id: "settings" },
|
2025-03-06 16:21:55 +01:00
|
|
|
geometry: { type: "Point", coordinates: [0, 0] },
|
2025-02-28 19:36:13 +01:00
|
|
|
}
|
2025-06-18 22:31:50 +02:00
|
|
|
const isLoggedIn = state?.osmConnection?.isLoggedIn ?? new ImmutableStore(false)
|
2023-12-20 02:49:34 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<div class="link-underline flex flex-col">
|
|
|
|
|
<Tr t={t.intro} />
|
|
|
|
|
<h3>
|
|
|
|
|
<Tr t={t.trackingTitle} />
|
|
|
|
|
</h3>
|
|
|
|
|
<Tr t={t.tracking} />
|
|
|
|
|
|
|
|
|
|
<h3>
|
|
|
|
|
<Tr t={t.geodataTitle} />
|
|
|
|
|
</h3>
|
2024-04-12 15:36:05 +02:00
|
|
|
<Tr t={t.geodata} />
|
2023-12-20 02:49:34 +01:00
|
|
|
|
|
|
|
|
<h3>
|
|
|
|
|
<Tr t={t.editingTitle} />
|
|
|
|
|
</h3>
|
2024-05-10 01:45:08 +02:00
|
|
|
<Tr t={t.editingIntro} />
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<Tr t={t.items.changesYouMake} />
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<Tr t={t.items.username} />
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<Tr t={t.items.date} />
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<Tr t={t.items.theme} />
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<Tr t={t.items.language} />
|
|
|
|
|
</li>
|
2024-05-10 12:47:15 +02:00
|
|
|
|
2024-05-10 01:45:08 +02:00
|
|
|
<li>
|
2024-05-10 12:47:15 +02:00
|
|
|
{#if $isLoggedIn}
|
2024-06-16 16:06:26 +02:00
|
|
|
<TagRenderingEditable
|
|
|
|
|
config={editPrivacy}
|
|
|
|
|
selectedElement={{
|
|
|
|
|
type: "Feature",
|
|
|
|
|
properties: { id: "settings" },
|
|
|
|
|
geometry: { type: "Point", coordinates: [0, 0] },
|
|
|
|
|
}}
|
|
|
|
|
{state}
|
|
|
|
|
tags={state.userRelatedState.preferencesAsTags}
|
|
|
|
|
/>
|
|
|
|
|
{:else}
|
|
|
|
|
<Tr t={t.items.distanceIndicator} />
|
|
|
|
|
{/if}
|
2024-05-10 01:45:08 +02:00
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<Tr t={t.editingOutro} />
|
2023-12-20 02:49:34 +01:00
|
|
|
|
2025-02-28 13:37:58 +01:00
|
|
|
<h3>
|
|
|
|
|
<Tr t={t.browsingHistoryTitle} />
|
|
|
|
|
</h3>
|
|
|
|
|
<Tr t={t.browsingHistoryIntro} />
|
|
|
|
|
{#if $isLoggedIn}
|
|
|
|
|
<Tr t={t.browsingHistoryLoggedIn} />
|
|
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<TagRenderingEditable
|
|
|
|
|
config={editLocationHistory}
|
2025-02-28 19:36:13 +01:00
|
|
|
{selectedElement}
|
2025-02-28 13:37:58 +01:00
|
|
|
{state}
|
|
|
|
|
tags={state.userRelatedState.preferencesAsTags}
|
|
|
|
|
/>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<TagRenderingEditable
|
|
|
|
|
config={editThemeHistory}
|
2025-02-28 19:36:13 +01:00
|
|
|
{selectedElement}
|
2025-02-28 13:37:58 +01:00
|
|
|
{state}
|
|
|
|
|
tags={state.userRelatedState.preferencesAsTags}
|
|
|
|
|
/>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
2025-03-06 16:21:55 +01:00
|
|
|
{:else}
|
2025-02-28 13:37:58 +01:00
|
|
|
<button class="as-link" on:click={() => state.osmConnection.AttemptLogin()}>
|
|
|
|
|
<Tr t={t.browsingHistoryNotLoggedIn} />
|
|
|
|
|
</button>
|
|
|
|
|
{/if}
|
2023-12-20 02:49:34 +01:00
|
|
|
<h3>
|
|
|
|
|
<Tr t={t.miscCookiesTitle} />
|
|
|
|
|
</h3>
|
|
|
|
|
<Tr t={t.miscCookies} />
|
|
|
|
|
|
2025-02-28 19:36:13 +01:00
|
|
|
<TagRenderingEditable
|
|
|
|
|
config={editReviews}
|
|
|
|
|
{selectedElement}
|
|
|
|
|
{state}
|
|
|
|
|
tags={state.userRelatedState.preferencesAsTags}
|
|
|
|
|
/>
|
|
|
|
|
|
2023-12-20 02:49:34 +01:00
|
|
|
<h3>
|
|
|
|
|
<Tr t={t.whileYoureHere} />
|
|
|
|
|
</h3>
|
|
|
|
|
<Tr t={t.surveillance} />
|
|
|
|
|
</div>
|