Chore: formatting, linting

This commit is contained in:
Pieter Vander Vennet 2024-06-16 16:41:57 +02:00
parent b315f3cebb
commit a87e3376e0
7 changed files with 1476 additions and 1235 deletions

View file

@ -299,7 +299,7 @@ This documentation is defined in the source code at [FeatureSwitchState.ts](/src
If true, the location distance indication will not be written to the changeset and other privacy enhancing measures might be taken. If true, the location distance indication will not be written to the changeset and other privacy enhancing measures might be taken.
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L169) This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L168)
The default value is _false_ The default value is _false_
@ -310,7 +310,7 @@ This documentation is defined in the source code at [FeatureSwitchState.ts](/src
Point mapcomplete to a different overpass-instance. Example: https://overpass-api.de/api/interpreter Point mapcomplete to a different overpass-instance. Example: https://overpass-api.de/api/interpreter
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L176) This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L174)
The default value is _https://overpass-api.de/api/interpreter,https://overpass.kumi.systems/api/interpreter,https://overpass.openstreetmap.ru/cgi/interpreter_ The default value is _https://overpass-api.de/api/interpreter,https://overpass.kumi.systems/api/interpreter,https://overpass.openstreetmap.ru/cgi/interpreter_
@ -321,7 +321,7 @@ This documentation is defined in the source code at [FeatureSwitchState.ts](/src
Set a different timeout (in seconds) for queries in overpass Set a different timeout (in seconds) for queries in overpass
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L187) This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L185)
The default value is _30_ The default value is _30_
@ -332,7 +332,7 @@ This documentation is defined in the source code at [FeatureSwitchState.ts](/src
point to switch between OSM-api and overpass point to switch between OSM-api and overpass
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L195) This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L193)
The default value is _16_ The default value is _16_
@ -343,7 +343,7 @@ This documentation is defined in the source code at [FeatureSwitchState.ts](/src
Tilesize when the OSM-API is used to fetch data within a BBOX Tilesize when the OSM-API is used to fetch data within a BBOX
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L203) This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L201)
The default value is _17_ The default value is _17_
@ -354,7 +354,7 @@ This documentation is defined in the source code at [FeatureSwitchState.ts](/src
The id of the background layer to start with The id of the background layer to start with
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L210) This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L208)
No default value set No default value set
@ -475,7 +475,7 @@ This documentation is defined in the source code at [FilteredLayer.ts](/src/Mode
The mode the application starts in, e.g. 'map', 'dashboard' or 'statistics' The mode the application starts in, e.g. 'map', 'dashboard' or 'statistics'
This documentation is defined in the source code at [generateDocs.ts](ervdvn/git/MapComplete/scripts/generateDocs.ts#L441) This documentation is defined in the source code at [generateDocs.ts](ervdvn/git2/MapComplete/scripts/generateDocs.ts#L439)
The default value is _map_ The default value is _map_

View file

@ -33,7 +33,7 @@
"oauth_token", "oauth_token",
undefined, undefined,
"Used to complete the login" "Used to complete the login"
) ),
}) })
const state = new UserRelatedState(osmConnection) const state = new UserRelatedState(osmConnection)
const t = Translations.t.index const t = Translations.t.index
@ -42,7 +42,7 @@
let userLanguages = osmConnection.userDetails.map((ud) => ud.languages) let userLanguages = osmConnection.userDetails.map((ud) => ud.languages)
let themeSearchText: UIEventSource<string | undefined> = new UIEventSource<string>(undefined) let themeSearchText: UIEventSource<string | undefined> = new UIEventSource<string>(undefined)
document.addEventListener("keydown", function(event) { document.addEventListener("keydown", function (event) {
if (event.ctrlKey && event.code === "KeyF") { if (event.ctrlKey && event.code === "KeyF") {
document.getElementById("theme-search")?.focus() document.getElementById("theme-search")?.focus()
event.preventDefault() event.preventDefault()
@ -89,16 +89,16 @@
<Tr t={t.title} /> <Tr t={t.title} />
</h1> </h1>
<p> <p>
<Tr <Tr
cls="my-4 mr-4 text-base font-semibold sm:text-lg md:mt-5 md:text-xl lg:mx-0" cls="my-4 mr-4 text-base font-semibold sm:text-lg md:mt-5 md:text-xl lg:mx-0"
t={Translations.t.index.intro} t={Translations.t.index.intro}
/> />
<span class="link-underline"> <span class="link-underline">
<a href="#about"><Tr t={Translations.t.index.learnMore} /> <a href="#about">
<ChevronDoubleRight class="w-4 h-4 inline" /> <Tr t={Translations.t.index.learnMore} />
</a> <ChevronDoubleRight class="inline h-4 w-4" />
</span> </a>
</span>
</p> </p>
</div> </div>
</div> </div>
@ -139,9 +139,9 @@
<p> <p>
<Tr <Tr
t={tr.hiddenExplanation.Subs({ t={tr.hiddenExplanation.Subs({
hidden_discovered: $visitedHiddenThemes.length.toString(), hidden_discovered: $visitedHiddenThemes.length.toString(),
total_hidden: hiddenThemes.length.toString(), total_hidden: hiddenThemes.length.toString(),
})} })}
/> />
</p> </p>
</svelte:fragment> </svelte:fragment>
@ -151,52 +151,47 @@
<LoginButton osmConnection={state.osmConnection} /> <LoginButton osmConnection={state.osmConnection} />
<h3 id="about"> <h3 id="about">
<Tr t={Translations.t.index.about} /> <Tr t={Translations.t.index.about} />
</h3> </h3>
<Tr cls="link-underline" t={Translations.t.general.aboutMapComplete.intro} /> <Tr cls="link-underline" t={Translations.t.general.aboutMapComplete.intro} />
<span class="links-as-button flex flex-col gap-y-1"> <span class="links-as-button flex flex-col gap-y-1">
<a class="flex" href="https://github.com/pietervdvn/MapComplete/" target="_blank">
<a class="flex" href="https://github.com/pietervdvn/MapComplete/" target="_blank">
<Github class="mr-2 h-6 w-6" /> <Github class="mr-2 h-6 w-6" />
<Tr t={Translations.t.general.attribution.gotoSourceCode} /> <Tr t={Translations.t.general.attribution.gotoSourceCode} />
</a> </a>
<a class="flex" href="https://github.com/pietervdvn/MapComplete/issues" target="_blank"> <a class="flex" href="https://github.com/pietervdvn/MapComplete/issues" target="_blank">
<Bug class="mr-2 h-6 w-6" /> <Bug class="mr-2 h-6 w-6" />
<Tr t={Translations.t.general.attribution.openIssueTracker} /> <Tr t={Translations.t.general.attribution.openIssueTracker} />
</a> </a>
<a class="flex" href="https://en.osm.town/@MapComplete" target="_blank"> <a class="flex" href="https://en.osm.town/@MapComplete" target="_blank">
<Mastodon class="mr-2 h-6 w-6" /> <Mastodon class="mr-2 h-6 w-6" />
<Tr t={Translations.t.general.attribution.followOnMastodon} /> <Tr t={Translations.t.general.attribution.followOnMastodon} />
</a> </a>
<a class="flex" href="https://liberapay.com/pietervdvn/" target="_blank"> <a class="flex" href="https://liberapay.com/pietervdvn/" target="_blank">
<Liberapay class="mr-2 h-6 w-6" /> <Liberapay class="mr-2 h-6 w-6" />
<Tr t={Translations.t.general.attribution.donate} /> <Tr t={Translations.t.general.attribution.donate} />
</a> </a>
<a
class="flex"
href={window.location.protocol + "//" + window.location.host + "/studio.html"}
>
<Pencil class="mr-2 h-6 w-6" />
<Tr t={Translations.t.general.morescreen.createYourOwnTheme} />
</a>
<a
class="flex"
href={window.location.protocol + "//" + window.location.host + "/privacy.html"}
>
<Eye class="mr-2 h-6 w-6" />
<Tr t={Translations.t.privacy.title} />
</a>
</span>
<a
class="flex"
href={window.location.protocol + "//" + window.location.host + "/studio.html"}
>
<Pencil class="mr-2 h-6 w-6" />
<Tr t={Translations.t.general.morescreen.createYourOwnTheme} />
</a>
<a
class="flex"
href={window.location.protocol + "//" + window.location.host + "/privacy.html"}
>
<Eye class="mr-2 h-6 w-6" />
<Tr t={Translations.t.privacy.title} />
</a>
</span>
</LoginToggle> </LoginToggle>
<Tr t={tr.streetcomplete} /> <Tr t={tr.streetcomplete} />

View file

@ -19,10 +19,7 @@
style="background-color: #00000088; z-index: 20" style="background-color: #00000088; z-index: 20"
/> />
<!-- draw a _second_ absolute div, placed using 'bottom' which will be above the navigation bar on mobile browsers --> <!-- draw a _second_ absolute div, placed using 'bottom' which will be above the navigation bar on mobile browsers -->
<div <div class={"absolute bottom-0 right-0 h-full w-screen p-4 md:p-6"} style="z-index: 21">
class={"absolute bottom-0 right-0 h-full w-screen p-4 md:p-6"}
style="z-index: 21"
>
<div class="content normal-background h-full" on:click|stopPropagation={() => {}}> <div class="content normal-background h-full" on:click|stopPropagation={() => {}}>
<div class="h-full rounded-xl"> <div class="h-full rounded-xl">
<slot /> <slot />

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
{ {
"contributors": [ "contributors": [
{ {
"commits": 7544, "commits": 7549,
"contributor": "Pieter Vander Vennet" "contributor": "Pieter Vander Vennet"
}, },
{ {

View file

@ -1,6 +1,5 @@
{ {
"ca": "català", "ca": "català",
"cs": "čeština",
"da": "dansk", "da": "dansk",
"de": "Deutsch", "de": "Deutsch",
"en": "English", "en": "English",
@ -12,7 +11,7 @@
"gl": "lingua galega", "gl": "lingua galega",
"he": "עברית", "he": "עברית",
"hu": "magyar", "hu": "magyar",
"id": "bahasa Indonesia", "id": "Indonesia",
"it": "italiano", "it": "italiano",
"ja": "日本語", "ja": "日本語",
"nb_NO": "bokmål", "nb_NO": "bokmål",
@ -23,6 +22,7 @@
"ru": "русский язык", "ru": "русский язык",
"sl": "slovenščina", "sl": "slovenščina",
"sv": "svenska", "sv": "svenska",
"zgh": "ⵜⴰⵎⴰⵣⵉⵖⵜ ⵜⴰⵏⴰⵡⴰⵢⵜ ⵜⴰⵎⵖⵔⵉⴱⵉⵜ",
"zh_Hans": "简体中文", "zh_Hans": "简体中文",
"zh_Hant": "繁體中文" "zh_Hant": "繁體中文"
} }

File diff suppressed because it is too large Load diff