Scripts: exclude 'statistics' from the android build

This commit is contained in:
Pieter Vander Vennet 2025-07-11 21:21:54 +02:00
parent 03ae26103c
commit 434b8004e9
2 changed files with 14 additions and 5 deletions

View file

@ -15,9 +15,13 @@ then
exit 0
fi
# We don't bundle studio; as it is not suited for small screens anyway
# We don't bundle studio, test and statistics; as it is not suited for small screens anyway
mv studio.html studiohtml
mv test.html testhtml
mv statistics.html statisticshtml
npm run build
mv statisticshtml statistics.html
mv testhtml test.html
mv studiohtml studio.html
echo '''
@ -70,6 +74,8 @@ while IFS= read -r file; do
# echo "Copying $file to $dest"
done < needed_assets.csv
cp dist/assets/layers/questions/*.svg dist-full/assets/layers/questions/
cp -r dist/assets/png dist-full/assets/
cp -r dist/assets/svg dist-full/assets/
cp -r dist/assets/templates dist-full/assets/

View file

@ -97,6 +97,8 @@
let isAndroid = AndroidPolyfill.inAndroid
let nrOfFailedImages = ImageUploadQueue.singleton.imagesInQueue
let failedImagesOpen = pg.failedImages
</script>
<div class="low-interaction flex h-full flex-col overflow-hidden" class:hidden={!$shown}>
@ -219,9 +221,9 @@
<a
class="flex"
href={$isAndroid
? "https://mapcomplete.org/studio"
: window.location.protocol + "//" + window.location.host + "/studio.html"}
href={($isAndroid
? "https://mapcomplete.org"
: ".")+"/studio.html"}
>
<Pencil class="mr-2 h-6 w-6" />
<Tr t={Translations.t.general.morescreen.createYourOwnTheme} />
@ -273,7 +275,8 @@
</a>
{#if !state.theme}
<a class="flex" href={`./statistics.html`} target="_blank">
<a class="flex" href={($isAndroid ? "https://mapcomplete.org" : ".") +`/statistics.html`}
target="_blank">
<ChartBar class="h-6 w-6" />
<Tr
t={Translations.t.general.attribution.openStatistics.Subs({ theme: "MapComplete" })}