diff --git a/setup.sh b/setup.sh index b1ec735..449f080 100644 --- a/setup.sh +++ b/setup.sh @@ -589,7 +589,7 @@ def export_pdf(): img = Paragraph('', styles['Normal']) elif game.url and 'gog.com' in game.url: try: - img_path = os.path.join(app.root_path, 'static', 'gog_logo.webp') + img_path = os.path.join(app.root_path, 'static', 'gog_logo.png') img = Image(img_path, width=3*cm, height=img_height) except Exception: img = Paragraph('', styles['Normal']) @@ -821,11 +821,10 @@ SHELL ["/bin/bash", "-c"] RUN apt-get update && apt-get install -y --no-install-recommends wget \ && mkdir -p /app/static \ - && wget -O /app/static/logo.webp "https://drop.nocadmin.net/logo.webp" \ - && wget -O /app/static/logo_small.webp "https://drop.nocadmin.net/logo_small.webp" \ - && wget -O /app/static/forgejo.webp "https://drop.nocadmin.net/forgejo.webp" \ - && wget -O /app/static/gog_logo.webp "https://drop.nocadmin.net/gog_logo.webp" \ - && wget -O /app/static/logo_small_maskable.webp "https://drop.nocadmin.net/logo_small_maskable.webp" \ + && wget -O /app/static/logo.png "https://git.nocci.it/nocci/GiftGamesDB/raw/branch/main/steam-gift-manager/static/logo.png" \ + && wget -O /app/static/logo_small.png "https://git.nocci.it/nocci/GiftGamesDB/raw/branch/main/steam-gift-manager/static/logo_small.png" \ + && wget -O /app/static/forgejo.svg "https://git.nocci.it/nocci/GiftGamesDB/raw/branch/main/steam-gift-manager/static/forgejo.svg" \ + && wget -O /app/static/gog_logo.png "https://git.nocci.it/nocci/GameKeyManager/raw/branch/dev/steam-gift-manager/static/gog_logo.png" \ && rm -rf /var/lib/apt/lists/* RUN mkdir -p /app/data && \ @@ -943,81 +942,6 @@ echo "✅ Database migration completed!" SCRIPT_END chmod +x ../upgrade.sh -# Manifest for PWA -cat < static/manifest.json -{ - "id": "/", - "name": "Game Key Manager", - "short_name": "GameKeys", - "start_url": "/", - "display": "standalone", - "background_color": "#212529", - "theme_color": "#212529", - "description": "Manage Steam/GOG keys easily!", - "orientation": "any", - "launch_handler": { - "client_mode": "navigate-existing" - }, - "icons": [ - { - "src": "/static/logo_small.webp", - "sizes": "192x192", - "type": "image/webp", - "purpose": "any" - }, - { - "src": "/static/logo_small_maskable.webp", - "sizes": "192x192", - "type": "image/webp", - "purpose": "maskable" - }, - { - "src": "/static/logo.webp", - "sizes": "512x512", - "type": "image/webp", - "purpose": "any maskable" - } - ] -} -MANIFEST_END - - -# Service Worker -cat < static/serviceworker.js -const CACHE_NAME = 'game-key-manager-v1'; -const ASSETS = [ - '/', - '/static/style.css', - '/static/logo.webp', - '/static/logo_small.webp', - '/static/gog_logo.webp', - '/static/forgejo.webp' -]; - -self.addEventListener('install', (event) => { - event.waitUntil( - caches.open(CACHE_NAME) - .then(cache => cache.addAll(ASSETS)) - ); -}); - -self.addEventListener('fetch', (event) => { - event.respondWith( - caches.match(event.request) - .then(cachedResponse => cachedResponse || fetch(event.request)) - ); -}); - -self.addEventListener('activate', (event) => { - event.waitUntil( - caches.keys().then(keys => Promise.all( - keys.filter(key => key !== CACHE_NAME) - .map(key => caches.delete(key)) - )) - ); -}); -SW_END - # 9. Templates mkdir -p templates static @@ -1025,47 +949,39 @@ mkdir -p templates static # Base Template cat < templates/base.html - + - - {{ _('Game Key Manager') }} - - - - - - +