mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 18:23:50 +00:00
remember last used config on reload
This commit is contained in:
parent
5ada9e5a0b
commit
3cb7d75601
|
@ -154,7 +154,7 @@ onMounted(async () => {
|
|||
: 1,
|
||||
);
|
||||
pairlistStore.selectOrCreateConfig(
|
||||
pairlistStore.savedConfigs.length > 0 ? pairlistStore.savedConfigs[0].name : 'default',
|
||||
pairlistStore.isSavedConfig(pairlistStore.configName) ? pairlistStore.configName : 'default',
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -55,9 +55,8 @@ export const usePairlistConfigStore = defineStore(
|
|||
return JSON.stringify(configToPayloadItems(), null, 2);
|
||||
});
|
||||
|
||||
const isSavedConfig = computed(
|
||||
() => savedConfigs.value.findIndex((c) => c.name === config.value.name) > -1,
|
||||
);
|
||||
const isSavedConfig = (name: string) =>
|
||||
savedConfigs.value.findIndex((c) => c.name === name) > -1;
|
||||
|
||||
function addToConfig(pairlist: Pairlist, index: number) {
|
||||
pairlist = structuredClone(toRaw(pairlist));
|
||||
|
@ -249,7 +248,7 @@ export const usePairlistConfigStore = defineStore(
|
|||
{
|
||||
persist: {
|
||||
key: 'ftPairlistConfig',
|
||||
paths: ['savedConfigs'],
|
||||
paths: ['savedConfigs', 'configName'],
|
||||
},
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue
Block a user