Fix: fix back-button on the 404-page, remove some obsolete classes

This commit is contained in:
Pieter Vander Vennet 2023-06-29 01:10:55 +02:00
parent fa650cc8d2
commit 006f69561a
18 changed files with 89 additions and 84 deletions

View file

@ -1,25 +0,0 @@
import BaseUIElement from "../BaseUIElement"
import Combine from "./Combine"
import BackToIndex from "../BigComponents/BackToIndex"
export default class LeftIndex extends Combine {
constructor(
leftContents: BaseUIElement[],
mainContent: BaseUIElement,
options?: {
hideBackButton: false | boolean
}
) {
let back: BaseUIElement = undefined
if (options?.hideBackButton ?? true) {
back = new BackToIndex()
}
super([
new Combine([new Combine([back, ...leftContents]).SetClass("sticky top-4")]).SetClass(
"ml-4 block w-full md:w-2/6 lg:w-1/6"
),
mainContent.SetClass("m-8 w-full mb-24"),
])
this.SetClass("h-full block md:flex")
}
}

View file

@ -1,16 +0,0 @@
import { SubtleButton } from "../Base/SubtleButton"
import Svg from "../../Svg"
import Translations from "../i18n/Translations"
import BaseUIElement from "../BaseUIElement"
export default class BackToIndex extends SubtleButton {
constructor(message?: string | BaseUIElement) {
super(
Svg.back_svg().SetStyle("height: 1.5rem;"),
message ?? Translations.t.general.backToMapcomplete,
{
url: "index.html",
}
)
}
}

14
UI/NotFound.svelte Normal file
View file

@ -0,0 +1,14 @@
<script>
import Tr from "./Base/Tr.svelte";
import Translations from "./i18n/Translations.ts";
import BackButton from "./Base/BackButton.svelte";
console.log("???")
</script>
<div class="flex flex-col">
<Tr t={Translations.t.general["404"]}></Tr>
<BackButton clss="m-8" on:click={() => {window.location = "index.html"}}>
<div class="flex w-full justify-center">
<Tr t={Translations.t.general.backToIndex}></Tr>
</div>
</BackButton>
</div>

View file

@ -1,13 +1,19 @@
{
"id": "mapcomplete-changes",
"title": {
"en": "Changes made with MapComplete"
"en": "Changes made with MapComplete",
"de": "Mit MapComplete erstellte Änderungen",
"nl": "Wijzigingen gemaakt met MapComplete"
},
"shortDescription": {
"en": "Shows changes made by MapComplete"
"en": "Show changes made with MapComplete",
"de": "Mit MapComplete erstellte Änderungen anzeigen",
"nl": "Toon wijzigingen gemaakt met MapComplete"
},
"description": {
"en": "This maps shows all the changes made with MapComplete"
"en": "This maps shows all the changes made with MapComplete",
"de": "Diese Karte zeigt alle mit MapComplete vorgenommenen Änderungen",
"nl": "Deze kaart toont alle wijzigingen die met MapComplete gemaakt werden"
},
"icon": "./assets/svg/logo.svg",
"hideFromOverview": true,
@ -20,7 +26,9 @@
{
"id": "mapcomplete-changes",
"name": {
"en": "Changeset centers"
"en": "Changeset centers",
"de": "Zentrum der Änderungssätze",
"nl": "Centerpunt van changeset"
},
"minzoom": 0,
"source": {
@ -31,41 +39,51 @@
},
"title": {
"render": {
"en": "Changeset for {theme}"
"en": "Changeset for {theme}",
"de": "Änderungssatz für {theme}"
}
},
"description": {
"en": "Shows all MapComplete changes"
"en": "Show all MapComplete changes",
"de": "Alle MapComplete-Änderungen anzeigen",
"nl": "Toon alle MapComplete wijzigingen"
},
"tagRenderings": [
{
"id": "show_changeset_id",
"render": {
"en": "Changeset <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>"
"en": "Changeset <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>",
"de": "Änderungssatz <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>"
}
},
{
"id": "contributor",
"question": {
"en": "What contributor did make this change?"
"en": "Which contributor made this change?",
"de": "Welcher Mitwirkende hat diese Änderung vorgenommen?",
"nl": "Welke bijdrager maakte deze wijziging?"
},
"freeform": {
"key": "user"
},
"render": {
"en": "Change made by <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>"
"en": "Change made by <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>",
"de": "Änderung gemacht von <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>",
"nl": "Wijziging gemaakt door <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>"
}
},
{
"id": "theme-id",
"question": {
"en": "What theme was used to make this change?"
"en": "What theme was used to make this change?",
"de": "Welches Thema wurde für diese Änderung verwendet?\""
},
"freeform": {
"key": "theme"
},
"render": {
"en": "Change with theme <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>"
"en": "Change with theme <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>",
"de": "Geändert mit Thema <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>"
}
},
{
@ -74,19 +92,27 @@
"key": "locale"
},
"question": {
"en": "What locale (language) was this change made in?"
"en": "What locale (language) was this change made in?",
"de": "In welcher Sprache wurde diese Änderung vorgenommen?",
"nl": "In welke locale (taal) werd deze wijziging gemaakt?"
},
"render": {
"en": "User locale is {locale}"
"en": "User locale is {locale}",
"de": "Usersprache ist {locale}",
"nl": "De gebruikerstaal is {locale}"
}
},
{
"id": "host",
"render": {
"en": "Change with with <a href='{host}'>{host}</a>"
"en": "Change made with <a href='{host}'>{host}</a>",
"de": "Änderung vorgenommen mit <a href='{host}'>{host}</a>",
"nl": "Wijziging gemaakt met <a href='{host}'>{host}</a>"
},
"question": {
"en": "What host (website) was this change made with?"
"en": "What host (website) was this change made with?",
"de": "Mit welchem Host / welcher Website wurde diese Änderung gemacht?",
"nl": "Met welke host (website) werd deze wijziging gemaakt?"
},
"freeform": {
"key": "host"
@ -107,10 +133,12 @@
{
"id": "version",
"question": {
"en": "What version of MapComplete was used to make this change?"
"en": "What version of MapComplete was used to make this change?",
"de": "Mit welcher Version von MapComplete wurde diese Änderung gemacht?"
},
"render": {
"en": "Made with {editor}"
"en": "Made with {editor}",
"de": "Erstellt mit {editor}"
},
"freeform": {
"key": "editor"
@ -444,7 +472,9 @@
}
],
"question": {
"en": "Themename contains {search}"
"en": "Theme name contains {search}",
"de": "Themenname enthält {search}",
"nl": "Themenaam bevat {search}"
}
}
]
@ -460,7 +490,9 @@
}
],
"question": {
"en": "Made by contributor {search}"
"en": "Made by contributor {search}",
"de": "Erstellt von {search}",
"nl": "Gemaakt door bijdrager {search}"
}
}
]
@ -476,7 +508,9 @@
}
],
"question": {
"en": "<b>Not</b> made by contributor {search}"
"en": "<b>Not</b> made by contributor {search}",
"de": "<b>Nicht</b> erstellt von {search}",
"nl": "<b>Niet</b> gemaakt door bijdrager {search}"
}
}
]
@ -493,7 +527,9 @@
}
],
"question": {
"en": "Made before {search}"
"en": "Made before {search}",
"de": "Erstellt vor {search}",
"nl": "Gemaakt voor {search}"
}
}
]
@ -510,7 +546,9 @@
}
],
"question": {
"en": "Made after {search}"
"en": "Made after {search}",
"de": "Erstellt nach {search}",
"nl": "Gemaakt na {search}"
}
}
]
@ -526,7 +564,9 @@
}
],
"question": {
"en": "User language (iso-code) {search}"
"en": "User language (iso-code) {search}",
"de": "Benutzersprache (ISO-Code) {search}",
"nl": "De taal van de bijdrager is {search}"
}
}
]
@ -542,7 +582,9 @@
}
],
"question": {
"en": "Made with host {search}"
"en": "Made with host {search}",
"de": "Erstellt mit Host {search}",
"nl": "Gemaakt met host {search}"
}
}
]
@ -553,7 +595,9 @@
{
"osmTags": "add-image>0",
"question": {
"en": "Changeset added at least one image"
"en": "Changeset added at least one image",
"de": "Changeset fügte mindestens ein Bild hinzu",
"nl": "Changeset bevat minstens één afbeelding"
}
}
]
@ -568,7 +612,8 @@
{
"id": "link_to_more",
"render": {
"en": "More statistics can be found <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>here</a>"
"en": "More statistics can be found <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>here</a>",
"de": "Mehr Statistiken gibt es <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>hier</a>"
}
},
{

View file

@ -146,7 +146,6 @@
},
"back": "Tornar",
"backToIndex": "Torna a la vista general amb tots els mapes temàtics",
"backToMapcomplete": "Tornar a l'explicació general de la petició",
"backgroundMap": "Mapa de fons",
"cancel": "Cancel·lar",
"confirm": "Confirmar",

View file

@ -146,7 +146,6 @@
},
"back": "Zpět",
"backToIndex": "Návrat na přehled všech tematických map",
"backToMapcomplete": "Zpět na přehled témat",
"backgroundMap": "Mapa na pozadí",
"cancel": "Zrušit",
"confirm": "Potvrdit",

View file

@ -95,7 +95,6 @@
"translatedBy": "MapComplete er oversat af {contributors} og <a href=\"https://github.com/pietervdvn/MapComplete/graphs/contributors\" target=\"_blank\">{hiddenCount} flere bidragsydere</a>"
},
"back": "Tilbage",
"backToMapcomplete": "Tilbage til temaoversigten",
"backgroundMap": "Baggrundskort",
"cancel": "Afbryd",
"confirm": "Bekræft",

View file

@ -161,7 +161,6 @@
},
"back": "Zurück",
"backToIndex": "Zurück zur Übersicht aller thematischen Karten",
"backToMapcomplete": "Zurück zur Themenübersicht",
"backgroundMap": "Hintergrundkarte auswählen",
"backgroundSwitch": "Hintergrund wechseln",
"cancel": "Abbrechen",

View file

@ -92,6 +92,7 @@
"whatIsOsm": "What is OpenStreetMap?"
},
"general": {
"404": "This page does not exist",
"about": "Easily edit and add OpenStreetMap for a certain theme",
"aboutMapComplete": {
"intro": "Use MapComplete to add OpenStreetMap info on a <b>single theme.</b> Answer questions, and within minutes your contributions are available everywhere. In most themes you can add pictures or even leave a review. The <b>theme maintainer</b> defines elements, questions and languages for it."
@ -161,7 +162,6 @@
},
"back": "Back",
"backToIndex": "Go back to the overview with all thematic maps",
"backToMapcomplete": "Back to the theme overview",
"backgroundMap": "Select a background layer",
"backgroundSwitch": "Switch background",
"cancel": "Cancel",

View file

@ -102,7 +102,6 @@
},
"back": "Atrás",
"backToIndex": "Volver a la vista general con todos los mapas temáticos",
"backToMapcomplete": "Volver a la vista de temas",
"backgroundMap": "Mapa de fondo",
"cancel": "Cancelar",
"confirm": "Confirmar",

View file

@ -118,7 +118,6 @@
},
"back": "Retour",
"backToIndex": "Revenir vers l'aperçu de toutes les cartes thématiques",
"backToMapcomplete": "Retour à l'aperçu du thème",
"backgroundMap": "Fond de plan",
"cancel": "Annuler",
"confirm": "Confirmer",

View file

@ -91,7 +91,6 @@
"themeBy": "A téma karbantartója: {author}"
},
"back": "Vissza",
"backToMapcomplete": "Vissza a témák áttekintéséhez",
"backgroundMap": "Háttértérkép",
"cancel": "Mégse",
"confirm": "Megerősítés",

View file

@ -96,7 +96,6 @@
"translatedBy": "MapComplete è stata tradotta da {contributors} e da <a href=\"https://github.com/pietervdvn/MapComplete/graphs/contributors\" target=\"_blank\">{hiddenCount} contributori aggiuntivi</a>"
},
"back": "Indietro",
"backToMapcomplete": "Torna alla panoramica sull'argomento",
"backgroundMap": "Mappa di sfondo",
"cancel": "Annulla",
"confirm": "Conferma",

View file

@ -125,7 +125,6 @@
"translatedBy": "MapComplete har blitt oversatt av {contributors} og <a href=\"https://github.com/pietervdvn/MapComplete/graphs/contributors\" target=\"_blank\">{hiddenCount} andre bidragsytere</a>."
},
"back": "Tilbake",
"backToMapcomplete": "Tilbake til temaoversikten",
"backgroundMap": "Bakgrunnskart",
"cancel": "Avbryt",
"confirm": "Bekreft",

View file

@ -148,7 +148,6 @@
},
"back": "Vorige",
"backToIndex": "Keer terug naar het overzicht met alle thematische kaarten",
"backToMapcomplete": "Terug naar het themaoverzicht",
"backgroundMap": "Selecteer een achtergrondlaag",
"cancel": "Annuleren",
"confirm": "Bevestigen",

View file

@ -134,7 +134,6 @@
},
"back": "Voltar",
"backToIndex": "Volte para a visão geral com todos os mapas temáticos",
"backToMapcomplete": "Voltar à visão geral do tema",
"backgroundMap": "Mapa de fundo",
"cancel": "Cancelar",
"confirm": "Confirmar",

View file

@ -118,7 +118,6 @@
"translatedBy": "MapComplete 由 {contributors} 翻譯,而且還有 <a href=\"https://github.com/pietervdvn/MapComplete/graphs/contributors\" target=\"_blank\">{hiddenCount} 更多貢獻者</a>"
},
"back": "回去",
"backToMapcomplete": "回到主題總覽",
"backgroundMap": "背景地圖",
"cancel": "取消",
"confirm": "確認",

View file

@ -1,5 +1,4 @@
import { FixedUiElement } from "./UI/Base/FixedUiElement"
import Combine from "./UI/Base/Combine"
import BackToIndex from "./UI/BigComponents/BackToIndex"
import SvelteUIElement from "./UI/Base/SvelteUIElement"
import NotFound from "./UI/NotFound.svelte"
new Combine([new FixedUiElement("This page is not found"), new BackToIndex()]).AttachTo("maindiv")
new SvelteUIElement(NotFound, {}).AttachTo("maindiv")