update readme due release on codeberg #2

Open
nocci wants to merge 26 commits from dev into main
1 changed files with 66 additions and 0 deletions
Showing only changes of commit 70e7afcf39 - Show all commits

View File

@ -942,6 +942,58 @@ echo "✅ Database migration completed!"
SCRIPT_END
chmod +x ../upgrade.sh
# Manifest for PWA
cat <<MANIFEST_END > static/manifest.json
{
"name": "Game Key Manager",
"short_name": "GameKeys",
"start_url": "/",
"display": "standalone",
"background_color": "#212529",
"theme_color": "#212529",
"description": "Manage Steam/GOG keys easily!",
"icons": [
{
"src": "/static/logo_small.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any maskable"
},
{
"src": "/static/logo.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
MANIFEST_END
# Service Worker
cat <<SW_END > static/serviceworker.js
const CACHE_NAME = 'game-key-manager-v1';
const ASSETS = [
'/',
'/static/style.css',
'/static/logo.png',
'/static/logo_small.png',
'/static/gog_logo.png'
];
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))
);
});
SW_END
# 9. Templates
mkdir -p templates static
@ -957,6 +1009,8 @@ cat <<HTML_END > templates/base.html
<title>{{ _('Game Key Manager') }}</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<link rel="manifest" href="{{ url_for('static', filename='manifest.json') }}">
<meta name="theme-color" content="#212529">
</head>
<body>
<nav class="navbar navbar-expand-lg bg-body-tertiary">
@ -1028,6 +1082,18 @@ cat <<HTML_END > templates/base.html
})
})
</script>
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('/static/serviceworker.js')
.then(function(registration) {
console.log('ServiceWorker registered:', registration.scope);
}, function(err) {
console.log('ServiceWorker registration failed:', err);
});
});
}
</script>
{% include "footer.html" %}
</body>
</html>