This commit is contained in:
seb
2026-10-16 15:38:39 +02:00
parent 5c57097ad0
commit 52411ac45d
5 changed files with 298 additions and 48 deletions

View File

@@ -107,7 +107,6 @@ export default class BackupSettingsPanel extends Component {
lastRestoreResult: null, // null | { type: 'skills' | 'applets', count: number, restored: string[] }
};
this.handleRefresh = this.handleRefresh.bind(this);
this.handleTierChange = this.handleTierChange.bind(this);
this.handleToggleExpand = this.handleToggleExpand.bind(this);
this.handleOpenConfirm = this.handleOpenConfirm.bind(this);
@@ -145,18 +144,6 @@ export default class BackupSettingsPanel extends Component {
}
// #endregion
// #region handleRefresh
// MARK: calls backupAutomat.actions.reload from ./api/index.js
async handleRefresh() {
try {
await backupAutomat.actions.reload();
enqueueSnackbar('Backup-Status aktualisiert', { variant: 'info' });
} catch (err) {
notifyError(err);
}
}
// #endregion
handleTierChange(_event, newValue) {
this.setState({ tierTab: newValue, expandedItemName: null });
}
@@ -262,7 +249,7 @@ export default class BackupSettingsPanel extends Component {
<Button
variant="outlined"
startIcon={<RefreshIcon />}
onClick={this.handleRefresh}
onClick={() => void this.loadBackups()}
sx={{ alignSelf: 'flex-start' }}
>
Erneut versuchen
@@ -286,28 +273,15 @@ export default class BackupSettingsPanel extends Component {
return (
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 3 }}>
{/* Header Title & Actions */}
<Box sx={{ display: 'flex', alignItems: 'flex-start', justifyContent: 'space-between', flexWrap: 'wrap', gap: 2 }}>
<Box>
<Typography variant="h6" fontWeight={700} sx={{ color: DARK_4, display: 'flex', alignItems: 'center', gap: 1 }}>
<BackupOutlinedIcon sx={{ color: PRIMARY }} />
Datensicherung & Backups
</Typography>
<Typography variant="body2" color="text.secondary" sx={{ mt: 0.5 }}>
Automatische Sicherung von Datenbank, virtuellem Dateisystem (VFS) und Dokumentenspeicher.
</Typography>
</Box>
<Stack direction="row" spacing={1.5} sx={{ alignItems: 'center' }}>
<Button
variant="outlined"
size="small"
startIcon={<RefreshIcon />}
onClick={this.handleRefresh}
disabled={status === 'loading'}
>
Aktualisieren
</Button>
</Stack>
{/* Header Title */}
<Box>
<Typography variant="h6" fontWeight={700} sx={{ color: DARK_4, display: 'flex', alignItems: 'center', gap: 1 }}>
<BackupOutlinedIcon sx={{ color: PRIMARY }} />
Datensicherung & Backups
</Typography>
<Typography variant="body2" color="text.secondary" sx={{ mt: 0.5 }}>
Automatische Sicherung von Datenbank, virtuellem Dateisystem (VFS) und Dokumentenspeicher.
</Typography>
</Box>
{/* Status Badges Bar */}