deleting configs

This commit is contained in:
Tako 2023-05-30 15:44:38 +00:00
parent af50b74a95
commit ee3cf53e6b

View File

@ -63,6 +63,15 @@ export const usePairlistConfigStore = defineStore(
} }
} }
function deleteConfig() {
const i = savedConfigs.value.findIndex((c) => c.name === config.value.name);
console.log(i);
if (i > -1) {
savedConfigs.value.splice(i, 1);
config.value = { name: '', pairlists: [] };
}
}
function newConfig() { function newConfig() {
config.value = { name: '', pairlists: [] }; config.value = { name: '', pairlists: [] };
} }
@ -147,6 +156,7 @@ export const usePairlistConfigStore = defineStore(
addToConfig, addToConfig,
removeFromConfig, removeFromConfig,
saveConfig, saveConfig,
deleteConfig,
selectConfig, selectConfig,
newConfig, newConfig,
addToBlacklist, addToBlacklist,