feat: Add optional web app flag which requires a login for every action

This commit is contained in:
Thea Tischbein
2025-05-05 11:39:53 +02:00
parent 630f2957de
commit 03aeb707f2
10 changed files with 39 additions and 13 deletions
+16 -10
View File
@@ -65,16 +65,22 @@ const maybeUpdateAccountSettings = async (payload) => {
}
};
const Preferences = () => (
<Container maxWidth="md" sx={{ marginTop: 3, marginBottom: 3 }}>
<Stack spacing={3}>
<Notifications />
<Reservations />
<Users />
<Appearance />
</Stack>
</Container>
);
const Preferences = () => {
if (!session.exists() or !config.requireLogin) {
window.location.href = routes.app;
return <></>;
}
return (
<Container maxWidth="md" sx={{ marginTop: 3, marginBottom: 3 }}>
<Stack spacing={3}>
<Notifications />
<Reservations />
<Users />
<Appearance />
</Stack>
</Container>
);
};
const Notifications = () => {
const { t } = useTranslation();