forked from MapComplete/MapComplete
Housekeeping: formatting
This commit is contained in:
parent
9d53a45f9a
commit
1528dfaae1
168 changed files with 3332 additions and 4560 deletions
|
@ -38,7 +38,7 @@
|
|||
const oauth_token = QueryParameters.GetQueryParameter(
|
||||
"oauth_token",
|
||||
undefined,
|
||||
"Used to complete the login",
|
||||
"Used to complete the login"
|
||||
)
|
||||
let osmConnection = new OsmConnection({
|
||||
oauth_token,
|
||||
|
@ -46,7 +46,7 @@
|
|||
const expertMode = UIEventSource.asBoolean(
|
||||
osmConnection.GetPreference("studio-expert-mode", "false", {
|
||||
documentation: "Indicates if more options are shown in mapcomplete studio",
|
||||
}),
|
||||
})
|
||||
)
|
||||
expertMode.addCallbackAndRunD((expert) => console.log("Expert mode is", expert))
|
||||
const createdBy = osmConnection.userDetails.data.name
|
||||
|
@ -54,23 +54,23 @@
|
|||
const studio = new StudioServer(studioUrl, uid)
|
||||
|
||||
let layersWithErr = UIEventSource.FromPromiseWithErr(studio.fetchOverview())
|
||||
let layers: Store<{ owner: number, id: string }[]> = layersWithErr.mapD((l) =>
|
||||
l["success"]?.filter((l) => l.category === "layers"),
|
||||
let layers: Store<{ owner: number; id: string }[]> = layersWithErr.mapD((l) =>
|
||||
l["success"]?.filter((l) => l.category === "layers")
|
||||
)
|
||||
let selfLayers = layers.mapD((ls) => ls.filter((l) => l.owner === uid.data), [uid])
|
||||
let otherLayers = layers.mapD(
|
||||
(ls) => ls.filter((l) => l.owner !== undefined && l.owner !== uid.data),
|
||||
[uid],
|
||||
[uid]
|
||||
)
|
||||
let officialLayers = layers.mapD((ls) => ls.filter((l) => l.owner === undefined), [uid])
|
||||
|
||||
let themes: Store<{ owner: number, id: string }[]> = layersWithErr.mapD((l) =>
|
||||
l["success"]?.filter((l) => l.category === "themes"),
|
||||
let themes: Store<{ owner: number; id: string }[]> = layersWithErr.mapD((l) =>
|
||||
l["success"]?.filter((l) => l.category === "themes")
|
||||
)
|
||||
let selfThemes = themes.mapD((ls) => ls.filter((l) => l.owner === uid.data), [uid])
|
||||
let otherThemes = themes.mapD(
|
||||
(ls) => ls.filter((l) => l.owner !== undefined && l.owner !== uid.data),
|
||||
[uid],
|
||||
[uid]
|
||||
)
|
||||
let officialThemes = themes.mapD((ls) => ls.filter((l) => l.owner === undefined), [uid])
|
||||
|
||||
|
@ -140,7 +140,7 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<If condition={layersWithErr.map((d) => d?.["error"] !== undefined) }>
|
||||
<If condition={layersWithErr.map((d) => d?.["error"] !== undefined)}>
|
||||
<div>
|
||||
<div class="alert">
|
||||
Something went wrong while contacting the MapComplete Studio Server: {$layersWithErr["error"]}
|
||||
|
@ -150,8 +150,8 @@
|
|||
<li>Try again in a few minutes</li>
|
||||
<li>
|
||||
Contact <a href="https://app.element.io/#/room/#MapComplete:matrix.org">
|
||||
the MapComplete community via the chat.
|
||||
</a>
|
||||
the MapComplete community via the chat.
|
||||
</a>
|
||||
Someone might be able to help you
|
||||
</li>
|
||||
<li>
|
||||
|
@ -175,8 +175,10 @@
|
|||
|
||||
<NextButton on:click={() => (state = "edit_layer")}>
|
||||
<div class="flex flex-col items-start">
|
||||
<div>Edit an existing layer</div>
|
||||
<div class="font-normal">Edit layers you created, others created or from the official MapComplete</div>
|
||||
<div>Edit an existing layer</div>
|
||||
<div class="font-normal">
|
||||
Edit layers you created, others created or from the official MapComplete
|
||||
</div>
|
||||
</div>
|
||||
</NextButton>
|
||||
<NextButton on:click={() => createNewLayer()}>Create a new layer</NextButton>
|
||||
|
@ -225,11 +227,17 @@
|
|||
<h3 slot="title">Your layers</h3>
|
||||
</ChooseLayerToEdit>
|
||||
<h3>Layers by other contributors</h3>
|
||||
<div>Selecting a layer will create a copy in your account that you edit. You will not change the version of the other contributor</div>
|
||||
<div>
|
||||
Selecting a layer will create a copy in your account that you edit. You will not change
|
||||
the version of the other contributor
|
||||
</div>
|
||||
<ChooseLayerToEdit {osmConnection} layerIds={$otherLayers} on:layerSelected={editLayer} />
|
||||
|
||||
<h3>Official layers by MapComplete</h3>
|
||||
<div>Selecting a layer will create a copy in your account. You will not change the version that is in MapComplete</div>
|
||||
<div>
|
||||
Selecting a layer will create a copy in your account. You will not change the version that
|
||||
is in MapComplete
|
||||
</div>
|
||||
<ChooseLayerToEdit
|
||||
{osmConnection}
|
||||
layerIds={$officialLayers}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue