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 exit 0
fi 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 studio.html studiohtml
mv test.html testhtml
mv statistics.html statisticshtml
npm run build npm run build
mv statisticshtml statistics.html
mv testhtml test.html
mv studiohtml studio.html mv studiohtml studio.html
echo ''' echo '''
@ -70,6 +74,8 @@ while IFS= read -r file; do
# echo "Copying $file to $dest" # echo "Copying $file to $dest"
done < needed_assets.csv 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/png dist-full/assets/
cp -r dist/assets/svg dist-full/assets/ cp -r dist/assets/svg dist-full/assets/
cp -r dist/assets/templates dist-full/assets/ cp -r dist/assets/templates dist-full/assets/

View file

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