diff --git a/frontend/src/App.vue b/frontend/src/App.vue index eb71018..4b8d9eb 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -9,7 +9,6 @@ import MultiStrategyPanel from './components/MultiStrategyPanel.vue' import OrdersTable from './components/OrdersTable.vue' import PositionsTable from './components/PositionsTable.vue' import StatusCards from './components/StatusCards.vue' -import StrategyPanel from './components/StrategyPanel.vue' import SweepPanel from './components/SweepPanel.vue' const status = ref({ @@ -35,6 +34,27 @@ const strategiesLoading = ref(true) const presets = ref([]) const multiStatus = ref({ running: false, strategies: [], total_pnl: 0, equity: 0 }) const liveCheck = ref({ ok: true, mode: 'paper', blockers: [] }) + +const runningLabel = computed(() => { + const list = multiStatus.value.strategies || [] + if (!list.length) return 'Idle' + if (list.length === 1) { + return `Running: ${list[0].strategy_name || list[0].strategy_key}` + } + return `Running: ${list.length} strategies` +}) + +const scopeLabel = computed(() => { + const list = multiStatus.value.strategies || [] + if (!list.length) { + return status.value.symbol ? `${status.value.symbol} ${status.value.timeframe}` : '' + } + const first = list[0] + const sameScope = list.every( + (s) => s.symbol === first.symbol && s.timeframe === first.timeframe, + ) + return sameScope ? `${first.symbol} ${first.timeframe}` : `${list.length} pairs` +}) const positions = ref([]) const orders = ref([]) const events = ref([]) @@ -98,25 +118,6 @@ async function handleDeletePreset(id) { await loadPresets() } -async function handleStart(payload) { - if (liveCheck.value.mode === 'live' && !liveCheck.value.ok) { - status.value = { - ...status.value, - error: 'Live trading blocked: ' + liveCheck.value.blockers.join('; '), - } - return - } - busy.value = true - try { - status.value = await api.startBot(payload) - await refreshAll() - } catch (error) { - status.value = { ...status.value, error: error.response?.data?.detail || error.message } - } finally { - busy.value = false - } -} - async function refreshMulti() { multiStatus.value = await api.getMultiStatus() } @@ -168,29 +169,6 @@ async function handleKillMany() { } } -async function handleStop() { - busy.value = true - try { - status.value = await api.stopBot() - await refreshMulti() - await refreshAll() - } finally { - busy.value = false - } -} - -async function handleKill() { - busy.value = true - try { - status.value = await api.killBot('manual kill switch') - await refreshAll() - } catch (error) { - status.value = { ...status.value, error: error.response?.data?.detail || error.message } - } finally { - busy.value = false - } -} - async function handleClose(id) { try { status.value = await api.closePosition(id) @@ -314,9 +292,8 @@ onUnmounted(() => {
diff --git a/frontend/src/components/StrategyPanel.vue b/frontend/src/components/StrategyPanel.vue
deleted file mode 100644
index b93862f..0000000
--- a/frontend/src/components/StrategyPanel.vue
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
-