feat: settings page

This commit is contained in:
Lucas
2026-11-03 15:38:51 +01:00
parent 87244e5ba3
commit 8c766c3bc2
15 changed files with 548 additions and 175 deletions
+6 -4
View File
@@ -6,7 +6,7 @@ import DSPPage from './pages/DspPage/DspPage';
import AddDSPForm from './pages/AddDspPage/AddDspPage';
import { useNotifications } from './hooks/useNotifications';
import Notifications from './components/Notifications/Notifications';
import CreditsPage from './pages/CreditsPage/CreditsPage';
import SettingsPage from './pages/SettingsPage/SettingsPage';
import HomePage from './pages/HomePage/HomePage';
import { addDSP, createDSPInstance, restoreDSPs } from './dsp/dspApi';
import { removeDSP } from './dsp/dspShared';
@@ -20,7 +20,7 @@ function App() {
const [selected, setSelected] = useState<number | null>(null);
const [page, setPage] = useState<AppPage>('home');
const [loaded, setLoaded] = useState(false);
const { notifications, notify, removeNotification, hoverNotification } = useNotifications();
const { notifications, notify, removeNotification, hoverNotification, setNotificationsDisabled } = useNotifications();
const connectedDspCount = dsps.filter((dsp) => isConnected(dsp)).length;
const restoreStarted = useRef(false);
const isMobile = useIsMobile();
@@ -96,8 +96,10 @@ function App() {
/>
<main className="stage">
{page === 'credits' ? (
<CreditsPage />
{page === 'settings' ? (
<SettingsPage
onNotificationsDisabledChange={setNotificationsDisabled}
/>
) : page === 'add-dsp' ? (
<AddDSPForm
onCancel={() => setPage('home')}