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">
|
||||
<i className="fa-solid fa-music"></i>
|
||||
</div>
|
||||
<h1 className="text-xl font-bold tracking-tight">TuneHub</h1>
|
||||
<h1 className="text-xl font-bold tracking-tight">Meishi Music</h1>
|
||||
</div>
|
||||
|
||||
<div className="flex-1 py-4 overflow-y-auto">
|
||||
@@ -1077,6 +1077,15 @@
|
||||
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 ---
|
||||
|
||||
return (
|
||||
@@ -1089,6 +1098,9 @@
|
||||
quality={quality}
|
||||
setQuality={setQuality}
|
||||
onClearCache={handleClearCache}
|
||||
syncToken={syncToken}
|
||||
setSyncToken={setSyncToken}
|
||||
onSyncNow={handleSync}
|
||||
/>
|
||||
|
||||
{/* Top Navigation / Search Bar */}
|
||||
@@ -1244,8 +1256,8 @@
|
||||
<!-- PWA Manifest Generation Script -->
|
||||
<script>
|
||||
const manifest = {
|
||||
"name": "TuneHub Music",
|
||||
"short_name": "TuneHub",
|
||||
"name": "Meishi Music",
|
||||
"short_name": "MeiShi",
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"background_color": "#111827",
|
||||
|
||||
Reference in New Issue
Block a user