From 0d942fc4e827a5542114f2c26e0601875c8bcb37 Mon Sep 17 00:00:00 2001 From: tim Date: Mon, 14 Oct 2024 17:19:09 -0400 Subject: [PATCH] disable Place Order if disallowed --- src/components/chart/ChartPlaceOrder.vue | 2 ++ src/store/store.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/chart/ChartPlaceOrder.vue b/src/components/chart/ChartPlaceOrder.vue index c3dfa4c..77daded 100644 --- a/src/components/chart/ChartPlaceOrder.vue +++ b/src/components/chart/ChartPlaceOrder.vue @@ -62,6 +62,8 @@ const theme = useTheme().current const orderColor = computed(()=>co.orders.length===0?null : co.orders[0].buy ? theme.value.colors.success:theme.value.colors.error) const valid = computed(()=>{ + if (!s.allowed) + return false if (co.drawing) return false for ( const order of co.orders ) diff --git a/src/store/store.js b/src/store/store.js index 984a344..e19f91b 100644 --- a/src/store/store.js +++ b/src/store/store.js @@ -43,7 +43,7 @@ export const useStore = defineStore('app', ()=> { const nav = ref(false) // controls opening navigation drawer const theme = ref('light') // todo 'dark' - const connected = ref(false) + const connected = ref(true) // we assume a connection will succeed until socket.io complains otherwise const allowed = ref(!REQUIRE_AUTH) const _chainId = ref(Number(Object.keys(versionMeta.chainInfo)[0]))