feat: add Datenschutzerklärung and Konto löschen pages
- Created datenschutz.vue for the privacy policy with sections on data protection, responsible entity, data processing, rights, and contact information. - Created konto-loeschen.vue for account deletion requests, detailing the process, affected data, and processing time. - Added anonymize-playstore-screenshot.sh script for image anonymization using ImageMagick. - Introduced playstore-assets.mjs for generating Play Store assets, including icons and feature graphics, using sharp. - Added playstore-assets.sh script to execute the asset generation script.
This commit is contained in:
32
scripts/anonymize-playstore-screenshot.sh
Executable file
32
scripts/anonymize-playstore-screenshot.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
if [[ $# -lt 3 ]]; then
|
||||
echo "Nutzung: $0 <input.png> <output.png> <rects>"
|
||||
echo "rects Format: x,y,w,h;x,y,w,h"
|
||||
echo "Beispiel: $0 shot.png shot-anon.png '80,120,420,70;72,720,540,90'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
INPUT="$1"
|
||||
OUTPUT="$2"
|
||||
RECTS="$3"
|
||||
|
||||
if ! command -v magick >/dev/null 2>&1; then
|
||||
echo "Fehler: 'magick' (ImageMagick) ist nicht installiert."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TMP="$OUTPUT.tmp.png"
|
||||
cp "$INPUT" "$TMP"
|
||||
|
||||
IFS=';' read -r -a BOXES <<< "$RECTS"
|
||||
for box in "${BOXES[@]}"; do
|
||||
IFS=',' read -r x y w h <<< "$box"
|
||||
magick "$TMP" \
|
||||
\( -size "${w}x${h}" xc:black -alpha set -channel a -evaluate set 70% +channel \) \
|
||||
-geometry "+${x}+${y}" -composite "$TMP"
|
||||
done
|
||||
|
||||
mv "$TMP" "$OUTPUT"
|
||||
echo "Anonymisierte Datei geschrieben: $OUTPUT"
|
||||
69
scripts/playstore-assets.mjs
Normal file
69
scripts/playstore-assets.mjs
Normal file
@@ -0,0 +1,69 @@
|
||||
#!/usr/bin/env node
|
||||
import { mkdir, readFile } from 'node:fs/promises'
|
||||
import path from 'node:path'
|
||||
import sharp from 'sharp'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
const __dirname = path.dirname(__filename)
|
||||
const rootDir = path.resolve(__dirname, '..')
|
||||
const logoSrc = path.join(rootDir, 'public', 'images', 'logos', 'Harheimer TC.svg')
|
||||
const outDir = path.join(rootDir, 'android-app', 'playstore-assets', 'generated')
|
||||
|
||||
const iconOut = path.join(outDir, 'playstore-icon-512.png')
|
||||
const featureOut = path.join(outDir, 'playstore-feature-graphic-1024x500.png')
|
||||
|
||||
const featureOverlaySvg = `
|
||||
<svg width="1024" height="500" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
|
||||
<stop offset="0%" stop-color="#0f172a"/>
|
||||
<stop offset="100%" stop-color="#1e293b"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect width="1024" height="500" fill="url(#bg)"/>
|
||||
<text x="430" y="185" font-size="66" font-family="DejaVu Sans, Arial, sans-serif" font-weight="700" fill="#e5e7eb">Harheimer TC</text>
|
||||
<text x="430" y="250" font-size="30" font-family="DejaVu Sans, Arial, sans-serif" fill="#cbd5e1">Tischtennis in Frankfurt-Harheim</text>
|
||||
</svg>
|
||||
`
|
||||
|
||||
async function generateAssets() {
|
||||
await mkdir(outDir, { recursive: true })
|
||||
|
||||
const logoBuffer = await readFile(logoSrc)
|
||||
const resizedLogoForIcon = await sharp(logoBuffer)
|
||||
.resize(440, 440, { fit: 'contain' })
|
||||
.png()
|
||||
.toBuffer()
|
||||
|
||||
await sharp({
|
||||
create: {
|
||||
width: 512,
|
||||
height: 512,
|
||||
channels: 4,
|
||||
background: { r: 0, g: 0, b: 0, alpha: 0 },
|
||||
},
|
||||
})
|
||||
.composite([{ input: resizedLogoForIcon, gravity: 'center' }])
|
||||
.png()
|
||||
.toFile(iconOut)
|
||||
|
||||
const resizedLogoForFeature = await sharp(logoBuffer)
|
||||
.resize(320, 320, { fit: 'contain' })
|
||||
.png()
|
||||
.toBuffer()
|
||||
|
||||
await sharp(Buffer.from(featureOverlaySvg))
|
||||
.composite([{ input: resizedLogoForFeature, left: 72, top: 90 }])
|
||||
.png()
|
||||
.toFile(featureOut)
|
||||
|
||||
console.log(`Fertig. Assets erzeugt in: ${outDir}`)
|
||||
console.log(`- ${path.basename(iconOut)}`)
|
||||
console.log(`- ${path.basename(featureOut)}`)
|
||||
}
|
||||
|
||||
generateAssets().catch((error) => {
|
||||
console.error('Fehler bei der Asset-Generierung:', error)
|
||||
process.exitCode = 1
|
||||
})
|
||||
6
scripts/playstore-assets.sh
Executable file
6
scripts/playstore-assets.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
|
||||
node "$ROOT_DIR/scripts/playstore-assets.mjs"
|
||||
Reference in New Issue
Block a user