forked from MapComplete/MapComplete
UX: somewhat decent landing page for app.mapcomplete.org
This commit is contained in:
parent
c167094b65
commit
7ebccfafd0
5 changed files with 39 additions and 15 deletions
19
app/AppIndex.svelte
Normal file
19
app/AppIndex.svelte
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
<script lang="ts">
|
||||||
|
|
||||||
|
import { DownloadIcon } from "@rgossiaux/svelte-heroicons/solid"
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="m-8 flex flex-col">
|
||||||
|
|
||||||
|
<h1>MapComplete Android App</h1>
|
||||||
|
|
||||||
|
MapComplete is available as Android App as direct download.
|
||||||
|
|
||||||
|
We are working on publishing this in the play store and on FDroid too.
|
||||||
|
|
||||||
|
<a class="button primary flex justify-center" href="https://app.mapcomplete.org/mapcomplete-latest.apk">
|
||||||
|
<DownloadIcon class="w-8 h-8"/>
|
||||||
|
Download the latest version
|
||||||
|
</a>
|
||||||
|
<a class="button" href="https://mapcomplete.org">Go back to mapcomplete</a>
|
||||||
|
</div>
|
5
app/app_index.ts
Normal file
5
app/app_index.ts
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
import AppIndex from "./AppIndex.svelte"
|
||||||
|
|
||||||
|
const target = document.getElementById("main")
|
||||||
|
target.innerHTML = ""
|
||||||
|
new AppIndex({ target })
|
|
@ -15,5 +15,5 @@ rm -rf dist
|
||||||
ssh hetzner "rm -rf /root/app/"
|
ssh hetzner "rm -rf /root/app/"
|
||||||
scp -rp to_upload/ hetzner:/root/app/
|
scp -rp to_upload/ hetzner:/root/app/
|
||||||
scp -rp to_upload/.well-known/ hetzner:/root/app/
|
scp -rp to_upload/.well-known/ hetzner:/root/app/
|
||||||
|
ssh hetzner "cp ~/apk/mapcomplete-latest.apk ~/app/"
|
||||||
rm -rf to_upload
|
rm -rf to_upload
|
||||||
|
|
|
@ -2,17 +2,14 @@
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
|
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
||||||
|
<link href="https://mapcomplete.org/css/index-tailwind-output.css" rel="stylesheet"/>
|
||||||
|
|
||||||
<title>MapComplete App</title>
|
<title>MapComplete App</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<div id="main"></div>
|
||||||
Hi!
|
<script type="module" src="./app_index.ts"></script>
|
||||||
|
|
||||||
MapComplete will soon (TM) be available as Android App in the play store and on FDroid.
|
|
||||||
|
|
||||||
In the meantime, there isn't a lot to see here.
|
|
||||||
|
|
||||||
<a href="https://mapcomplete.org">Go back to mapcomplete</a>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -10,11 +10,14 @@ const st =window.localStorage.getItem(key )
|
||||||
console.log("Prev state is", key, st)
|
console.log("Prev state is", key, st)
|
||||||
const tokenSrc = new UIEventSource("")
|
const tokenSrc = new UIEventSource("")
|
||||||
new VariableUiElement(tokenSrc).AttachTo("token")
|
new VariableUiElement(tokenSrc).AttachTo("token")
|
||||||
|
|
||||||
|
|
||||||
new OsmConnection().finishLogin(async (_, token: string) => {
|
new OsmConnection().finishLogin(async (_, token: string) => {
|
||||||
console.log("Login finished, redirecting to passthrough; token is " + token)
|
console.log("Login finished, redirecting to passthrough; token is " + token)
|
||||||
tokenSrc.set(token)
|
tokenSrc.set(token)
|
||||||
await Utils.waitFor(500)
|
await Utils.waitFor(500)
|
||||||
window.location.href = "orgmapcomplete://passthrough.html?oauth_token=" + token
|
window.location.href = "orgmapcomplete://passthrough.html?oauth_token=" + token
|
||||||
await Utils.waitFor(500)
|
tokenSrc.set("Closing...")
|
||||||
|
await Utils.waitFor(50)
|
||||||
window.close()
|
window.close()
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue