mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 06:13:45 +02:00
Merge branch 'develop' of github.com:pterodactyl/panel into develop
This commit is contained in:
@@ -25,6 +25,7 @@ export default ({ backup }: Props) => {
|
||||
const setServerFromState = ServerContext.useStoreActions(actions => actions.server.setServerFromState);
|
||||
const [ modal, setModal ] = useState('');
|
||||
const [ loading, setLoading ] = useState(false);
|
||||
const [ truncate, setTruncate ] = useState(false);
|
||||
const { clearFlashes, clearAndAddHttpError } = useFlash();
|
||||
const { mutate } = getServerBackups();
|
||||
|
||||
@@ -62,7 +63,7 @@ export default ({ backup }: Props) => {
|
||||
const doRestorationAction = () => {
|
||||
setLoading(true);
|
||||
clearFlashes('backups');
|
||||
restoreServerBackup(uuid, backup.uuid)
|
||||
restoreServerBackup(uuid, backup.uuid, truncate)
|
||||
.then(() => setServerFromState(s => ({
|
||||
...s,
|
||||
status: 'restoring_backup',
|
||||
@@ -108,6 +109,8 @@ export default ({ backup }: Props) => {
|
||||
css={tw`text-red-500! w-5! h-5! mr-2`}
|
||||
id={'restore_truncate'}
|
||||
value={'true'}
|
||||
checked={truncate}
|
||||
onChange={() => setTruncate(s => !s)}
|
||||
/>
|
||||
Remove all files and folders before restoring this backup.
|
||||
</label>
|
||||
|
||||
Reference in New Issue
Block a user