mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-26 04:55:15 +00:00
Add "disable confirm dialog" for forced exits
This commit is contained in:
parent
22c31ff100
commit
0ac7bbdc26
|
@ -111,6 +111,7 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
const botStore = useBotStore();
|
const botStore = useBotStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const settingsStore = useSettingsStore();
|
||||||
const currentPage = ref(1);
|
const currentPage = ref(1);
|
||||||
const selectedItemIndex = ref();
|
const selectedItemIndex = ref();
|
||||||
const filterText = ref('');
|
const filterText = ref('');
|
||||||
|
@ -182,8 +183,12 @@ function forceExitHandler(item: Trade, ordertype: string | undefined = undefined
|
||||||
feTrade.value = item;
|
feTrade.value = item;
|
||||||
confirmExitValue.value = ModalReasons.forceExit;
|
confirmExitValue.value = ModalReasons.forceExit;
|
||||||
confirmExitText.value = `Really exit trade ${item.trade_id} (Pair ${item.pair}) using ${ordertype} Order?`;
|
confirmExitText.value = `Really exit trade ${item.trade_id} (Pair ${item.pair}) using ${ordertype} Order?`;
|
||||||
removeTradeVisible.value = true;
|
|
||||||
feOrderType.value = ordertype;
|
feOrderType.value = ordertype;
|
||||||
|
if (settingsStore.confirmDialog === true) {
|
||||||
|
removeTradeVisible.value = true;
|
||||||
|
} else {
|
||||||
|
forceExitExecuter();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function forceExitExecuter() {
|
function forceExitExecuter() {
|
||||||
|
|
|
@ -32,6 +32,7 @@ export const useSettingsStore = defineStore('uiSettings', {
|
||||||
useHeikinAshiCandles: false,
|
useHeikinAshiCandles: false,
|
||||||
notifications: notificationDefaults,
|
notifications: notificationDefaults,
|
||||||
profitDistributionBins: 20,
|
profitDistributionBins: 20,
|
||||||
|
confirmDialog: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
|
|
|
@ -36,6 +36,11 @@
|
||||||
>Background sync</b-form-checkbox
|
>Background sync</b-form-checkbox
|
||||||
>
|
>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
|
<b-form-group description="Use confirmation dialogs when force-exiting a trade.">
|
||||||
|
<b-form-checkbox v-model="settingsStore.confirmDialog"
|
||||||
|
>Show Confirm Dialog for Trade Exits</b-form-checkbox
|
||||||
|
>
|
||||||
|
</b-form-group>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="d-flex flex-column border rounded p-2 mb-2 gap-2">
|
<div class="d-flex flex-column border rounded p-2 mb-2 gap-2">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user