diff --git a/android b/android index 653a12bb1..9102d6ef8 160000 --- a/android +++ b/android @@ -1 +1 @@ -Subproject commit 653a12bb198e50191ea4496ddbacf468e4ba963c +Subproject commit 9102d6ef876bf50bae9fd5c6ffec251e4d44276f diff --git a/index.html b/index.html index 30747a539..7c137a2f7 100644 --- a/index.html +++ b/index.html @@ -39,6 +39,7 @@
+ diff --git a/src/Logic/Web/AndroidPolyfill.ts b/src/Logic/Web/AndroidPolyfill.ts new file mode 100644 index 000000000..f6477320c --- /dev/null +++ b/src/Logic/Web/AndroidPolyfill.ts @@ -0,0 +1,38 @@ +/** + * The Android Polyfill will attempt to communicate with the Anrdoid Shell. + * If this is successful, it will patch some webAPIs + */ +import { registerPlugin } from "@capacitor/core" + +export class AndroidPolyfill { + private readonly databridgePlugin: DatabridgePlugin + + constructor() { + this.databridgePlugin = registerPlugin("Databridge", { + web: () => { + return { + async request(options: { key: string }): Promise<{ value: string }> { + return { value: "web" } + }, + } + }, + }) + + } + + public async init(){ + const shell = await this.databridgePlugin.request({ key: "meta" }) + if(shell.value === "web"){ + console.log("Not initing Android polyfill; web detected") + return + } + console.log("Detected shell:", shell.value) + } + +} + +export interface DatabridgePlugin { + request(options: { key: string }): Promise<{ value: string }>; +} + +new AndroidPolyfill().init() diff --git a/src/assets/svg/Mapcomplete_logo_centered.svelte b/src/assets/svg/Mapcomplete_logo_centered.svelte new file mode 100644 index 000000000..f98c605f1 --- /dev/null +++ b/src/assets/svg/Mapcomplete_logo_centered.svelte @@ -0,0 +1,4 @@ + + OpenStreetMap logo 2011 image/svg+xml OpenStreetMap logo 2011 Ken Vermette April 2011 OpenStreetMap.org Replacement logo for OpenStreetMap Foundation OSM openstreetmap logo http://wiki.openstreetmap.org/wiki/File:Public-images-osm_logo.svg \ No newline at end of file diff --git a/theme.html b/theme.html index 824e219ca..5643f9ed0 100644 --- a/theme.html +++ b/theme.html @@ -91,6 +91,7 @@ +