feat: make logo clickable to reset inputs and reload page

This commit is contained in:
Jannik committed 2026-08-15 10:59:34 +02:00
1 parent 07156d8ea0
commit d7e6c1849d
2 files changed
+11 -2

No files matched your search

+2
View File
@@ -77,6 +77,7 @@ const translations = {
// Download // Download
selectTitleFirst: 'Zuerst Titel auswählen', selectTitleFirst: 'Zuerst Titel auswählen',
downloadZipBtn: 'ZIP herunterladen', downloadZipBtn: 'ZIP herunterladen',
startOver: 'Neu starten',
}, },
en: { en: {
appTitle: 'MelodyMuse', appTitle: 'MelodyMuse',
@@ -152,6 +153,7 @@ const translations = {
// Download // Download
selectTitleFirst: 'Select a title first', selectTitleFirst: 'Select a title first',
downloadZipBtn: 'Download ZIP', downloadZipBtn: 'Download ZIP',
startOver: 'Start over',
} }
}; };
+9 -2
View File
@@ -371,12 +371,19 @@ export function HomePage() {
<header className="shrink-0 z-30 sticky top-0 bg-bg-card/70 backdrop-blur-md border-b border-border shadow-sm"> <header className="shrink-0 z-30 sticky top-0 bg-bg-card/70 backdrop-blur-md border-b border-border shadow-sm">
<div className="max-w-screen-2xl mx-auto px-4 sm:px-6 h-12 flex items-center justify-between"> <div className="max-w-screen-2xl mx-auto px-4 sm:px-6 h-12 flex items-center justify-between">
{/* Logo */} {/* Logo */}
<div className="flex items-center gap-2.5"> <button
className="flex items-center gap-2.5 cursor-pointer hover:opacity-80 transition-opacity"
onClick={() => {
window.localStorage.removeItem(DRAFT_KEY);
window.location.reload();
}}
title={t.startOver}
>
<MusicBarsLogo /> <MusicBarsLogo />
<span className="text-sm font-extrabold gradient-text-animated tracking-tight"> <span className="text-sm font-extrabold gradient-text-animated tracking-tight">
MelodyMuse MelodyMuse
</span> </span>
</div> </button>
{/* Right controls */} {/* Right controls */}
<div className="flex items-center gap-4"> <div className="flex items-center gap-4">