This commit is contained in:
2026-04-29 07:39:29 +02:00
parent 41a5472582
commit b866845b6a
40 changed files with 71735 additions and 111 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 682 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 859 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1 @@
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path fill="#F7DF1E" d="M0 0h256v256H0V0Z"></path><path d="m67.312 213.932l19.59-11.856c3.78 6.701 7.218 12.371 15.465 12.371c7.905 0 12.89-3.092 12.89-15.12v-81.798h24.057v82.138c0 24.917-14.606 36.259-35.916 36.259c-19.245 0-30.416-9.967-36.087-21.996m85.07-2.576l19.588-11.341c5.157 8.421 11.859 14.607 23.715 14.607c9.969 0 16.325-4.984 16.325-11.858c0-8.248-6.53-11.17-17.528-15.98l-6.013-2.58c-17.357-7.387-28.87-16.667-28.87-36.257c0-18.044 13.747-31.792 35.228-31.792c15.294 0 26.292 5.328 34.196 19.247l-18.732 12.03c-4.125-7.389-8.591-10.31-15.465-10.31c-7.046 0-11.514 4.468-11.514 10.31c0 7.217 4.468 10.14 14.778 14.608l6.014 2.577c20.45 8.765 31.963 17.7 31.963 37.804c0 21.654-17.012 33.51-39.867 33.51c-22.339 0-36.774-10.654-43.819-24.574"></path></svg>

After

Width:  |  Height:  |  Size: 995 B

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

View File

@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="206" height="231" viewBox="0 0 206 231">
<!-- Wrapper SVG that embeds the PNG app icon so existing references to tauri.svg render the PNG -->
<image href="appIcon.png" width="206" height="231" preserveAspectRatio="xMidYMid slice" />
</svg>

After

Width:  |  Height:  |  Size: 289 B

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,19 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96" role="img" aria-labelledby="title desc">
<title id="title">Radio placeholder</title>
<desc id="desc">Fallback icon for stations without a logo.</desc>
<defs>
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
<stop offset="0%" stop-color="#203343"/>
<stop offset="100%" stop-color="#10141b"/>
</linearGradient>
<linearGradient id="accent" x1="0" y1="0" x2="1" y2="1">
<stop offset="0%" stop-color="#4dd7c8"/>
<stop offset="100%" stop-color="#8fb3ff"/>
</linearGradient>
</defs>
<rect width="96" height="96" rx="24" fill="url(#bg)"/>
<rect x="17" y="20" width="62" height="56" rx="14" fill="none" stroke="url(#accent)" stroke-width="5"/>
<circle cx="36" cy="48" r="8" fill="url(#accent)"/>
<path d="M50 39h12M50 48h12M50 57h8" stroke="#f7f8fb" stroke-width="5" stroke-linecap="round"/>
<path d="M27 80c7-7 14-10 21-10s14 3 21 10" fill="none" stroke="#ffb45c" stroke-width="5" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

104
RadioWebApp/index.html Normal file
View File

@@ -0,0 +1,104 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RadioPlayer</title>
<link rel="manifest" href="manifest.json">
<meta name="description" content="RadioPlayer - stream and cast your favorite radio stations.">
<meta name="theme-color" content="#111318">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="RadioPlayer">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="icon" type="image/png" sizes="192x192" href="assets/radioplayer-logo-192.png">
<link rel="icon" type="image/png" sizes="512x512" href="assets/radioplayer-logo-512.png">
<link rel="apple-touch-icon" href="assets/radioplayer-logo-192.png">
<style>
html, body {
margin: 0;
min-height: 100%;
background: #111318;
}
#app-loading {
position: fixed;
inset: 0;
z-index: 2147483647;
display: grid;
place-items: center;
padding: 24px;
color: #f7f8fb;
background:
radial-gradient(circle at 18% 8%, rgba(77, 215, 200, 0.24), transparent 34%),
radial-gradient(circle at 86% 82%, rgba(255, 180, 92, 0.2), transparent 32%),
linear-gradient(180deg, #111318 0%, #101218 58%, #111821 100%);
}
.app-loading-card {
display: grid;
justify-items: center;
gap: 14px;
text-align: center;
}
.app-loading-logo {
width: 92px;
height: 92px;
border-radius: 24px;
box-shadow: 0 20px 48px rgba(0, 0, 0, 0.38);
}
.app-loading-title {
font: 800 1.2rem/1.1 Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
letter-spacing: 0.01em;
}
.app-loading-subtitle {
color: rgba(247, 248, 251, 0.72);
font: 600 0.88rem/1.4 Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
.app-loading-bar {
width: min(220px, 68vw);
height: 6px;
overflow: hidden;
border-radius: 999px;
background: rgba(255, 255, 255, 0.08);
}
.app-loading-bar::before {
content: "";
display: block;
width: 42%;
height: 100%;
border-radius: inherit;
background: linear-gradient(90deg, #4dd7c8, #8fb3ff);
animation: app-loading-slide 1.1s ease-in-out infinite alternate;
}
@keyframes app-loading-slide {
from { transform: translateX(-18%); }
to { transform: translateX(118%); }
}
</style>
<!-- Google Cast Web Sender SDK -->
<script src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"></script>
<script type="module" crossorigin src="./assets/index-1777223363071-C0f4S1Tv.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-1777223363071-BIky9ODB.css">
</head>
<body>
<div id="app-loading" role="status" aria-live="polite" aria-label="Loading RadioPlayer">
<div class="app-loading-card">
<img class="app-loading-logo" src="assets/radioplayer-logo-192.png" alt="RadioPlayer" />
<div class="app-loading-title">RadioPlayer</div>
<div class="app-loading-subtitle">Loading your stations...</div>
<div class="app-loading-bar" aria-hidden="true"></div>
</div>
</div>
<div id="root"></div>
</body>
</html>

42
RadioWebApp/manifest.json Normal file
View File

@@ -0,0 +1,42 @@
{
"id": "radioplayer",
"name": "RadioPlayer",
"short_name": "Radio",
"description": "RadioPlayer - stream and cast your favorite radio stations.",
"start_url": "./",
"scope": ".",
"display": "fullscreen",
"display_override": ["fullscreen", "window-controls-overlay", "standalone", "minimal-ui", "browser"],
"orientation": "portrait-primary",
"background_color": "#111318",
"theme_color": "#111318",
"categories": ["music", "entertainment"],
"icons": [
{
"src": "assets/radioplayer-logo-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any maskable"
},
{
"src": "assets/radioplayer-logo-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any maskable"
}
],
"shortcuts": [
{
"name": "Open RadioPlayer",
"short_name": "Open",
"description": "Launch RadioPlayer",
"url": "./",
"icons": [
{
"src": "assets/radioplayer-logo-192.png",
"sizes": "192x192"
}
]
}
]
}

1696
RadioWebApp/stations.json Normal file

File diff suppressed because it is too large Load Diff

106
RadioWebApp/sw.js Normal file
View File

@@ -0,0 +1,106 @@
// NOTE: This service worker is for the web/PWA build.
// For development we aggressively unregister SWs in `src/player.js`.
//
// This value is rewritten automatically before each build so deployed clients
// refresh to the newest shell and cached assets.
const CACHE_NAME = 'radioplayer-pwa-v5-1777223362895';
const CORE_ASSETS = [
'./',
'index.html',
'data/radio-stations.json',
'stations.json',
'manifest.json',
'assets/radioplayer-logo-192.png',
'assets/radioplayer-logo-512.png',
];
const CORE_PATHS = new Set(CORE_ASSETS.map((p) => new URL(p, self.registration.scope).pathname));
self.addEventListener('install', (event) => {
// Activate updated SW as soon as it's installed.
self.skipWaiting();
event.waitUntil(
caches.open(CACHE_NAME).then(async (cache) => {
const reqs = CORE_ASSETS.map((p) => new Request(p, { cache: 'reload' }));
await cache.addAll(reqs);
// Vite fingerprints JS/CSS assets in production. Parse the built HTML so
// the installed PWA can launch offline after its first install.
try {
const indexResp = await fetch(new Request('./', { cache: 'reload' }));
const indexText = await indexResp.clone().text();
await cache.put('./', indexResp);
const assetUrls = [...indexText.matchAll(/(?:src|href)="([^"]+)"/g)]
.map((match) => match[1])
.filter((assetPath) => assetPath.startsWith('./assets/') || assetPath.startsWith('assets/'))
.map((assetPath) => new URL(assetPath, self.registration.scope).href);
await Promise.all(assetUrls.map((assetUrl) => {
return cache.add(new Request(assetUrl, { cache: 'reload' })).catch(() => {});
}));
} catch (e) {
// If HTML parsing fails, runtime caching below still catches assets.
}
})
);
});
self.addEventListener('activate', (event) => {
event.waitUntil(
Promise.all([
self.clients.claim(),
caches.keys().then((keys) => Promise.all(
keys.map((k) => { if (k !== CACHE_NAME) return caches.delete(k); return null; })
)),
])
);
});
self.addEventListener('fetch', (event) => {
// Only handle GET requests
if (event.request.method !== 'GET') return;
const url = new URL(event.request.url);
// Don't cache cross-origin requests (station logos, APIs, etc.).
if (url.origin !== self.location.origin) {
return;
}
const isCore = CORE_PATHS.has(url.pathname);
const isHtmlNavigation = event.request.mode === 'navigate' || (event.request.headers.get('accept') || '').includes('text/html');
// Network-first for navigations and core assets to prevent "old UI" issues.
if (isHtmlNavigation || isCore) {
event.respondWith(
fetch(event.request)
.then((networkResp) => {
const respClone = networkResp.clone();
caches.open(CACHE_NAME).then((cache) => cache.put(event.request, respClone)).catch(() => {});
return networkResp;
})
.catch(() => caches.match(event.request).then((cached) => cached || caches.match('./') || caches.match('index.html')))
);
return;
}
event.respondWith(
caches.match(event.request).then((cached) => {
if (cached) return cached;
return fetch(event.request).then((networkResp) => {
// Optionally cache new resources (best-effort)
try {
const respClone = networkResp.clone();
caches.open(CACHE_NAME).then((cache) => cache.put(event.request, respClone)).catch(()=>{});
} catch (e) {}
return networkResp;
}).catch(() => {
// If offline and HTML navigation, return cached index.html
if (event.request.mode === 'navigate') return caches.match('./') || caches.match('index.html');
return new Response('', { status: 503, statusText: 'Service Unavailable' });
});
})
);
});