diff --git a/packages/web_ui/src/components/SavesList.tsx b/packages/web_ui/src/components/SavesList.tsx index c7644a77..f0576d06 100644 --- a/packages/web_ui/src/components/SavesList.tsx +++ b/packages/web_ui/src/components/SavesList.tsx @@ -139,16 +139,6 @@ function downloadSave(control: Control, instanceId: number, name: string) { }); } -function unusedSaveName(name: string, taken: Set) { - const base = name.replace(/\.zip$/, ""); - for (let i = 2; ; i++) { - const candidate = `${base}-${i}.zip`; - if (!taken.has(candidate)) { - return candidate; - } - } -} - type TransferModalProps = { disabled: boolean; saves: lib.SaveDetails[]; @@ -252,7 +242,6 @@ type BulkActionsProps = { disabled: boolean; instanceId: number; saves: lib.SaveDetails[]; - allNames: string[]; onDone: (failed: string[]) => void; }; @@ -269,21 +258,9 @@ function BulkActions(props: BulkActionsProps) { .finally(() => setRunning(undefined)); } - function copy() { - const taken = new Set(props.allNames); - run("copy", save => { - const destination = unusedSaveName(save.name, taken); - taken.add(destination); - return control.send(new lib.InstanceCopySaveRequest(props.instanceId, save.name, destination)); - }, "Error copying"); - } - const disabled = props.disabled || running !== undefined; return {count} selected - {account.hasPermission("core.instance.save.copy") && } {account.hasPermission("core.instance.save.download") &&