feat(ui): rebrand to Meishi Music and wire up sidebar
- Rename application from TuneHub to Meishi Music in UI and PWA manifest - Implement cache clearing logic to remove local storage items - Pass sync state and handlers to the Sidebar component
This commit is contained in:
18
index.html
18
index.html
@@ -361,7 +361,7 @@
|
|||||||
<div className="w-10 h-10 bg-primary rounded-full flex items-center justify-center text-black font-bold text-xl">
|
<div className="w-10 h-10 bg-primary rounded-full flex items-center justify-center text-black font-bold text-xl">
|
||||||
<i className="fa-solid fa-music"></i>
|
<i className="fa-solid fa-music"></i>
|
||||||
</div>
|
</div>
|
||||||
<h1 className="text-xl font-bold tracking-tight">TuneHub</h1>
|
<h1 className="text-xl font-bold tracking-tight">Meishi Music</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex-1 py-4 overflow-y-auto">
|
<div className="flex-1 py-4 overflow-y-auto">
|
||||||
@@ -1077,6 +1077,15 @@
|
|||||||
return () => audio.removeEventListener('loadedmetadata', onLoadedMetadata);
|
return () => audio.removeEventListener('loadedmetadata', onLoadedMetadata);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
const handleClearCache = () => {
|
||||||
|
localStorage.removeItem('th_playlist');
|
||||||
|
localStorage.removeItem('th_current');
|
||||||
|
localStorage.removeItem('th_favorites');
|
||||||
|
localStorage.removeItem('th_quality');
|
||||||
|
localStorage.removeItem('th_sync_token');
|
||||||
|
window.location.reload();
|
||||||
|
};
|
||||||
|
|
||||||
// --- Render ---
|
// --- Render ---
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -1089,6 +1098,9 @@
|
|||||||
quality={quality}
|
quality={quality}
|
||||||
setQuality={setQuality}
|
setQuality={setQuality}
|
||||||
onClearCache={handleClearCache}
|
onClearCache={handleClearCache}
|
||||||
|
syncToken={syncToken}
|
||||||
|
setSyncToken={setSyncToken}
|
||||||
|
onSyncNow={handleSync}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Top Navigation / Search Bar */}
|
{/* Top Navigation / Search Bar */}
|
||||||
@@ -1244,8 +1256,8 @@
|
|||||||
<!-- PWA Manifest Generation Script -->
|
<!-- PWA Manifest Generation Script -->
|
||||||
<script>
|
<script>
|
||||||
const manifest = {
|
const manifest = {
|
||||||
"name": "TuneHub Music",
|
"name": "Meishi Music",
|
||||||
"short_name": "TuneHub",
|
"short_name": "MeiShi",
|
||||||
"start_url": ".",
|
"start_url": ".",
|
||||||
"display": "standalone",
|
"display": "standalone",
|
||||||
"background_color": "#111827",
|
"background_color": "#111827",
|
||||||
|
|||||||
Reference in New Issue
Block a user