Line data Source code
1 : <template>
2 2073 : <SidebarIcon
3 : icon="icon-[ph--terminal-bold]"
4 : :label="$t('sideToolbar.labels.console')"
5 : :tooltip="$t('menu.toggleBottomPanel')"
6 : :selected="bottomPanelStore.activePanel == 'terminal'"
7 : @click="toggleConsole"
8 : />
9 : </template>
10 :
11 : <script setup lang="ts">
12 : import { useTelemetry } from '@comfyorg/telemetry'
13 : import { useBottomPanelStore } from '@/stores/workspace/bottomPanelStore'
14 :
15 : import SidebarIcon from './SidebarIcon.vue'
16 :
17 2014 : const bottomPanelStore = useBottomPanelStore()
18 :
19 : /**
20 : * Toggle console bottom panel and track UI button click.
21 : */
22 2014 : const toggleConsole = () => {
23 22 : useTelemetry()?.trackUiButtonClicked({
24 : button_id: 'sidebar_bottom_panel_console_toggled',
25 : element_group: 'sidebar'
26 : })
27 22 : bottomPanelStore.toggleBottomPanel()
28 : }
29 : </script>
|