Feature: Android Beta-Tester Banner für bestehende Nutzer (SW by-v814)
This commit is contained in:
parent
06022cf5da
commit
5a30f657a1
4 changed files with 24 additions and 10 deletions
|
|
@ -341,7 +341,7 @@ MEDIA_DIR = os.getenv("MEDIA_DIR", "/data/media")
|
||||||
os.makedirs(MEDIA_DIR, exist_ok=True)
|
os.makedirs(MEDIA_DIR, exist_ok=True)
|
||||||
app.mount("/media", StaticFiles(directory=MEDIA_DIR), name="media")
|
app.mount("/media", StaticFiles(directory=MEDIA_DIR), name="media")
|
||||||
|
|
||||||
APP_VER = "813" # muss mit APP_VER in app.js übereinstimmen
|
APP_VER = "814" # muss mit APP_VER in app.js übereinstimmen
|
||||||
|
|
||||||
@app.get("/.well-known/assetlinks.json")
|
@app.get("/.well-known/assetlinks.json")
|
||||||
async def assetlinks():
|
async def assetlinks():
|
||||||
|
|
|
||||||
|
|
@ -99,9 +99,9 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- CSS: Reihenfolge ist wichtig — ?v= zwingt Browser zur Neuladung -->
|
<!-- CSS: Reihenfolge ist wichtig — ?v= zwingt Browser zur Neuladung -->
|
||||||
<link rel="stylesheet" href="/css/design-system.css?v=813">
|
<link rel="stylesheet" href="/css/design-system.css?v=814">
|
||||||
<link rel="stylesheet" href="/css/layout.css?v=813">
|
<link rel="stylesheet" href="/css/layout.css?v=814">
|
||||||
<link rel="stylesheet" href="/css/components.css?v=813">
|
<link rel="stylesheet" href="/css/components.css?v=814">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
@ -581,10 +581,10 @@
|
||||||
<div id="modal-container"></div>
|
<div id="modal-container"></div>
|
||||||
|
|
||||||
<!-- JS: Reihenfolge ist wichtig — erst Basis, dann Features -->
|
<!-- JS: Reihenfolge ist wichtig — erst Basis, dann Features -->
|
||||||
<script src="/js/api.js?v=813"></script>
|
<script src="/js/api.js?v=814"></script>
|
||||||
<script src="/js/ui.js?v=813"></script>
|
<script src="/js/ui.js?v=814"></script>
|
||||||
<script src="/js/app.js?v=813"></script>
|
<script src="/js/app.js?v=814"></script>
|
||||||
<script src="/js/worlds.js?v=813"></script>
|
<script src="/js/worlds.js?v=814"></script>
|
||||||
|
|
||||||
<!-- Feature-Seiten werden lazy geladen -->
|
<!-- Feature-Seiten werden lazy geladen -->
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Router, State-Management, Navigation, Initialisierung.
|
Router, State-Management, Navigation, Initialisierung.
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const APP_VER = '813'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
const APP_VER = '814'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||||
const APP_VERSION = '1.5.0'; // ← semantische Version, wird bei make release gesetzt
|
const APP_VERSION = '1.5.0'; // ← semantische Version, wird bei make release gesetzt
|
||||||
const IS_STAGING = location.hostname === 'staging.banyaro.app';
|
const IS_STAGING = location.hostname === 'staging.banyaro.app';
|
||||||
// Cache-Bust-Parameter nach Update-Reload sofort entfernen
|
// Cache-Bust-Parameter nach Update-Reload sofort entfernen
|
||||||
|
|
@ -543,6 +543,7 @@ const App = (() => {
|
||||||
if (window.Worlds) window.Worlds.init(state);
|
if (window.Worlds) window.Worlds.init(state);
|
||||||
|
|
||||||
_showVerifyBanner();
|
_showVerifyBanner();
|
||||||
|
_showAndroidBetaBanner();
|
||||||
_updateNotifBadge();
|
_updateNotifBadge();
|
||||||
_updateChatBadge();
|
_updateChatBadge();
|
||||||
_checkNearbyAlerts();
|
_checkNearbyAlerts();
|
||||||
|
|
@ -634,6 +635,19 @@ const App = (() => {
|
||||||
document.getElementById('meta-theme-color')?.setAttribute('content', isDark ? '#0f1623' : '#C4843A');
|
document.getElementById('meta-theme-color')?.setAttribute('content', isDark ? '#0f1623' : '#C4843A');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _showAndroidBetaBanner() {
|
||||||
|
// Nur auf Android, nur einmalig, nur für eingeloggte Nutzer
|
||||||
|
if (!/android/i.test(navigator.userAgent)) return;
|
||||||
|
if (localStorage.getItem('by_android_beta_dismissed')) return;
|
||||||
|
setTimeout(() => {
|
||||||
|
UI.toast.info(
|
||||||
|
'📱 Play Store Beta: Hilf uns beim Android-Test! Schreib an <a href="mailto:support@banyaro.app" style="color:#fff;font-weight:700;text-decoration:underline">support@banyaro.app</a>',
|
||||||
|
20000
|
||||||
|
);
|
||||||
|
localStorage.setItem('by_android_beta_dismissed', '1');
|
||||||
|
}, 5000);
|
||||||
|
}
|
||||||
|
|
||||||
function _showVerifyBanner() {
|
function _showVerifyBanner() {
|
||||||
const banner = document.getElementById('verify-banner');
|
const banner = document.getElementById('verify-banner');
|
||||||
if (!banner) return;
|
if (!banner) return;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Offline-Cache + Push Notifications + Tile-Cache
|
Offline-Cache + Push Notifications + Tile-Cache
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const CACHE_VERSION = 'by-v813';
|
const CACHE_VERSION = 'by-v814';
|
||||||
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
||||||
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
||||||
const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache
|
const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue