From 0ac7bbdc266d7cbcd2d597927a1ee50347dad963 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 1 Dec 2023 06:29:22 +0100 Subject: [PATCH] Add "disable confirm dialog" for forced exits --- src/components/ftbot/TradeList.vue | 7 ++++++- src/stores/settings.ts | 1 + src/views/SettingsView.vue | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/ftbot/TradeList.vue b/src/components/ftbot/TradeList.vue index d9323c37..ff0b536c 100644 --- a/src/components/ftbot/TradeList.vue +++ b/src/components/ftbot/TradeList.vue @@ -111,6 +111,7 @@ const props = defineProps({ }); const botStore = useBotStore(); const router = useRouter(); +const settingsStore = useSettingsStore(); const currentPage = ref(1); const selectedItemIndex = ref(); const filterText = ref(''); @@ -182,8 +183,12 @@ function forceExitHandler(item: Trade, ordertype: string | undefined = undefined feTrade.value = item; confirmExitValue.value = ModalReasons.forceExit; confirmExitText.value = `Really exit trade ${item.trade_id} (Pair ${item.pair}) using ${ordertype} Order?`; - removeTradeVisible.value = true; feOrderType.value = ordertype; + if (settingsStore.confirmDialog === true) { + removeTradeVisible.value = true; + } else { + forceExitExecuter(); + } } function forceExitExecuter() { diff --git a/src/stores/settings.ts b/src/stores/settings.ts index a2b40b10..a943e84c 100644 --- a/src/stores/settings.ts +++ b/src/stores/settings.ts @@ -32,6 +32,7 @@ export const useSettingsStore = defineStore('uiSettings', { useHeikinAshiCandles: false, notifications: notificationDefaults, profitDistributionBins: 20, + confirmDialog: true, }; }, getters: { diff --git a/src/views/SettingsView.vue b/src/views/SettingsView.vue index 8357aa36..4e5e990a 100644 --- a/src/views/SettingsView.vue +++ b/src/views/SettingsView.vue @@ -36,6 +36,11 @@ >Background sync + + Show Confirm Dialog for Trade Exits +