UI: improve app landing page, add translations

This commit is contained in:
Pieter Vander Vennet 2025-05-03 22:56:05 +02:00
parent 7342acb410
commit c5ef64c5d2
5 changed files with 57 additions and 16 deletions

View file

@ -1,19 +1,42 @@
<script lang="ts">
import { DownloadIcon } from "@rgossiaux/svelte-heroicons/solid"
import Translations from "../src/UI/i18n/Translations"
import Tr from "../src/UI/Base/Tr.svelte"
import LanguagePicker from "../src/UI/InputElement/LanguagePicker.svelte"
const t = Translations.t.app
</script>
<div class="m-8 flex flex-col">
<h1>MapComplete Android App</h1>
<head>
<link rel="stylesheet" href="./assets/index-tailwind-output.css" />
<title><Tr t={t.title} /></title>
</head>
MapComplete is available as Android App as direct download. We are working on publishing this in
the play store and on FDroid too.
<div class="flex flex-col p-8">
<div class="self-end">
<a
class="button primary flex justify-center"
href="https://app.mapcomplete.org/mapcomplete-latest.apk"
>
<DownloadIcon class="h-8 w-8" />
Download the latest version
</a>
<a class="button" href="https://mapcomplete.org">Go back to mapcomplete</a>
<LanguagePicker />
</div>
<div class="flex justify-around">
<div class="m-8 flex flex-col max-w-128">
<h1>
<Tr t={t.title} />
</h1>
<Tr t={t.intro} />
<a
class="button primary flex justify-center"
href="https://builds.mapcomplete.org/apk/mapcomplete-latest.apk"
>
<DownloadIcon class="h-8 w-8" />
<Tr t={t.download} />
</a>
<a class="button" href="https://mapcomplete.org">
<Tr t={t.back} />
</a>
<a class="link-underline w-fit self-end" href="https://builds.mapcomplete.org/apk/">
<Tr t={t.older} />
</a>
</div>
</div>
</div>

View file

@ -1,5 +1,5 @@
#! /bin/bash
# To be run from app directory
nvm use
export NODE_OPTIONS="--max-old-space-size=8192"
@ -8,12 +8,16 @@ npm run build:vite:app-landing
mkdir to_upload
mv dist/app/* to_upload/
cp -r .well-known/ to_upload/
mkdir -p to_upload/assets
mkdir -p to_upload/assets/fonts
cp ../public/css/index-tailwind-output.css to_upload/assets/
cp ../public/assets/fonts/source-sans-pro.regular.ttf to_upload/assets/fonts/
cp dist/assets/*.js to_upload/assets/
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/"
ssh hetzner "cp ~/public/apk/mapcomplete-latest.apk ~/app/"
rm -rf to_upload