From 7ebccfafd0950fc142ad8be5cabc38ebce90ce84 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Wed, 22 Jan 2025 02:22:53 +0100 Subject: [PATCH] UX: somewhat decent landing page for app.mapcomplete.org --- app/AppIndex.svelte | 19 +++++++++++++++++++ app/app_index.ts | 5 +++++ app/build_and_deploy.sh | 2 +- app/index.html | 15 ++++++--------- app/land.ts | 13 ++++++++----- 5 files changed, 39 insertions(+), 15 deletions(-) create mode 100644 app/AppIndex.svelte create mode 100644 app/app_index.ts diff --git a/app/AppIndex.svelte b/app/AppIndex.svelte new file mode 100644 index 000000000..81a2620db --- /dev/null +++ b/app/AppIndex.svelte @@ -0,0 +1,19 @@ + + +
+ +

MapComplete Android App

+ +MapComplete is available as Android App as direct download. + +We are working on publishing this in the play store and on FDroid too. + + + + Download the latest version + +Go back to mapcomplete +
diff --git a/app/app_index.ts b/app/app_index.ts new file mode 100644 index 000000000..53bbd9fea --- /dev/null +++ b/app/app_index.ts @@ -0,0 +1,5 @@ +import AppIndex from "./AppIndex.svelte" + +const target = document.getElementById("main") +target.innerHTML = "" +new AppIndex({ target }) diff --git a/app/build_and_deploy.sh b/app/build_and_deploy.sh index edc551150..fffe3f769 100755 --- a/app/build_and_deploy.sh +++ b/app/build_and_deploy.sh @@ -15,5 +15,5 @@ rm -rf dist ssh hetzner "rm -rf /root/app/" scp -rp to_upload/ hetzner:/root/app/ scp -rp to_upload/.well-known/ hetzner:/root/app/ - +ssh hetzner "cp ~/apk/mapcomplete-latest.apk ~/app/" rm -rf to_upload diff --git a/app/index.html b/app/index.html index 5e620ef23..40dd620a1 100644 --- a/app/index.html +++ b/app/index.html @@ -2,17 +2,14 @@ + + + MapComplete App - -Hi! - -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. - -Go back to mapcomplete - +
+ + diff --git a/app/land.ts b/app/land.ts index 8a01ffe93..0136a0979 100644 --- a/app/land.ts +++ b/app/land.ts @@ -6,15 +6,18 @@ import { VariableUiElement } from "../src/UI/Base/VariableUIElement" console.log("Authorizing...") const key = Constants.osmAuthConfig.url + "oauth2_state" -const st =window.localStorage.getItem(key ) -console.log("Prev state is",key, st) +const st = window.localStorage.getItem(key) +console.log("Prev state is", key, st) const tokenSrc = new UIEventSource("") new VariableUiElement(tokenSrc).AttachTo("token") + + 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) await Utils.waitFor(500) - window.location.href = "orgmapcomplete://passthrough.html?oauth_token="+token - await Utils.waitFor(500) + window.location.href = "orgmapcomplete://passthrough.html?oauth_token=" + token + tokenSrc.set("Closing...") + await Utils.waitFor(50) window.close() })