Refactor settings panel layout and add export database functionality

This commit is contained in:
2026-03-13 21:57:29 +01:00
parent a7d5b58dbf
commit d5bfefefd1

View File

@@ -2269,6 +2269,7 @@ export default function App() {
<span aria-hidden="true">×</span> <span aria-hidden="true">×</span>
</button> </button>
</div> </div>
<div className="settings-panel__body">
<div className="settings-panel__section-title">Interface</div> <div className="settings-panel__section-title">Interface</div>
<div className="settings-panel__section"> <div className="settings-panel__section">
<label className="settings-panel__label" htmlFor="theme-select"> <label className="settings-panel__label" htmlFor="theme-select">
@@ -2381,6 +2382,32 @@ export default function App() {
rows={6} rows={6}
/> />
</div> </div>
<div className="settings-panel__section-title">Export</div>
<div className="settings-panel__section">
<button
className="button"
onClick={() => {
handleExportDatabase().catch((error) => {
console.error("Failed to export database", error);
});
}}
disabled={dbExporting}
type="button"
>
{dbExporting ? "Exporting…" : "Export DB"}
</button>
<div className="settings-panel__hint">
Save a backup copy of the current SQLite database.
</div>
{dbExportStatus ? (
<div
className={`settings-panel__status settings-panel__status--${dbExportStatus.tone}`}
>
{dbExportStatus.message}
</div>
) : null}
</div>
</div>
</div> </div>
</div> </div>
) : null} ) : null}