fix: delete instance data and remove legacy shared workspace support
This commit is contained in:
@@ -18,7 +18,7 @@ export function Instances() {
|
||||
const confirm = useConfirm();
|
||||
async function operate(i: Instance, operation: string) {
|
||||
if (operation === 'delete') {
|
||||
if (!await confirm.ask({title: '删除实例', danger: true, confirmLabel: '确认删除', body: <>确认删除实例「{i.name}」?此操作不可撤销,实例数据会保留在数据目录中。</>})) return;
|
||||
if (!await confirm.ask({title: '删除实例', danger: true, confirmLabel: '永久删除', body: <>确认删除实例「{i.name}」?此操作不可撤销,将永久删除该实例的文件、配置、快照及备份。请先下载需要保留的数据。</>})) return;
|
||||
} else if (operation !== 'start') {
|
||||
if (!await confirm.ask({title: '停止或重启实例', confirmLabel: '确认执行', body: <>确认停止或重启「{i.name}」?当前连接将中断。</>})) return;
|
||||
}
|
||||
@@ -26,6 +26,7 @@ export function Instances() {
|
||||
await api.request(instancePath(i.id) + (operation === 'delete' ? '' : '/' + operation), operation === 'delete' ? 'DELETE' : 'POST');
|
||||
if (selected?.id === i.id && operation === 'delete') setSelected(undefined);
|
||||
await instances.refresh();
|
||||
if (operation === 'delete') await usage.refresh();
|
||||
}, '服务器已完成操作');
|
||||
}
|
||||
const stats = [
|
||||
|
||||
Reference in New Issue
Block a user