feat: persist sessions and add unsaved-change modals
This commit is contained in:
18
server.js
18
server.js
@@ -430,10 +430,18 @@ app.get('*', (req, res) => {
|
||||
res.sendFile(path.join(__dirname, 'build', 'index.html'));
|
||||
});
|
||||
|
||||
app.listen(port, () => {
|
||||
console.log(`Server läuft auf Port ${port}`);
|
||||
});
|
||||
|
||||
restoreSessionsFromDisk().catch((error) => {
|
||||
async function startServer() {
|
||||
try {
|
||||
await restoreSessionsFromDisk();
|
||||
} catch (error) {
|
||||
console.error('[RESTORE] Fehler bei der Session-Wiederherstellung:', error.message);
|
||||
}
|
||||
app.listen(port, () => {
|
||||
console.log(`Server läuft auf Port ${port}`);
|
||||
});
|
||||
}
|
||||
|
||||
startServer().catch((error) => {
|
||||
console.error('[STARTUP] Unerwarteter Fehler:', error);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
@@ -28,7 +28,7 @@ function App() {
|
||||
const [dirtyDialogMessage, setDirtyDialogMessage] = useState('');
|
||||
const [pendingNavigation, setPendingNavigation] = useState(null);
|
||||
const [dirtyDialogSaving, setDirtyDialogSaving] = useState(false);
|
||||
const [confirmDialog, setConfirmDialog] = useState({ open: false });
|
||||
const [confirmDialog, setConfirmDialog] = useState({ open: false, resolve: null });
|
||||
|
||||
const weekdays = ['Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag'];
|
||||
const delay = useCallback((ms) => new Promise((resolve) => setTimeout(resolve, ms)), []);
|
||||
|
||||
Reference in New Issue
Block a user