11<script setup lang="ts">
22import type { Query , SavedQueryScope } from ' ../engine'
33import Button from ' @antfu/design/components/Action/ActionButton.vue'
4- import ActionDarkToggle from ' @antfu/design/components/Action/ActionDarkToggle .vue'
4+ import ActionIconButton from ' @antfu/design/components/Action/ActionIconButton .vue'
55import DisplayBadge from ' @antfu/design/components/Display/DisplayBadge.vue'
66import LayoutSplitPane from ' @antfu/design/components/Layout/LayoutSplitPane.vue'
77import { Pane } from ' splitpanes'
@@ -14,7 +14,7 @@ import ResultViewer from './components/ResultViewer.vue'
1414import SavedQueriesPanel from ' ./components/SavedQueriesPanel.vue'
1515import { backend , connect , connection } from ' ./composables/rpc'
1616import { useSavedQueries } from ' ./composables/saved'
17- import { colorScheme } from ' ./composables/scheme'
17+ import { isDark } from ' ./composables/scheme'
1818import { useWorkbench } from ' ./composables/workbench'
1919import ' @antfu/design/styles.css'
2020
@@ -96,18 +96,17 @@ function queryAppend(path: string): void {
9696 :color =" connection .connected ? 100 : 200 "
9797 />
9898 <div class =" flex-auto" />
99- <a
99+ <ActionIconButton
100+ icon="i-ph:book-open-duotone "
101+ as="a"
100102 href="https://devfra.me /plugins/data-inspector"
101103 target="_blank"
102104 title="Data Inspector docs — using the plugin and providing data sources"
103- class =" flex items-center gap-1 text-xs color-muted hover:color-active"
104- >
105- <span class =" i-ph:book-open-duotone text-base" />
106- <span >Docs</span >
107- </a >
108- <ActionDarkToggle
109- :color-scheme =" colorScheme "
110- @update :color-scheme =" colorScheme = $event "
105+ />
106+ <ActionIconButton
107+ icon="i-ph:sun-duotone dark:i-ph :moon-duotone "
108+ title="Toggle dark mode"
109+ @click =" isDark = ! isDark "
111110 />
112111 </div >
113112
@@ -121,13 +120,13 @@ function queryAppend(path: string): void {
121120 {{ wb.activeSource.value?.description }}
122121 </div >
123122 <div class =" flex-auto" />
124- <Button
125- size="sm"
126- :icon =" showDataSourceDetails ? ' i-ph:eye-slash-duotone' : ' i-ph:eye-duotone' "
123+ <ActionIconButton
124+ icon="i-ph:caret-down "
125+ class="transition flex-none text-sm"
126+ :class =" { ' rotate-180' : showDataSourceDetails } "
127+ :title =" showDataSourceDetails ? ' Hide details' : ' Show details' "
127128 @click =" showDataSourceDetails = ! showDataSourceDetails "
128- >
129- <span >{{ showDataSourceDetails ? 'Hide' : 'Show' }} details</span >
130- </Button >
129+ />
131130 </div >
132131
133132 <div v-if =" connection.connected && !wb.sources.value.length" class =" text-xs color-muted" >
0 commit comments