Skip to content

Commit ff67040

Browse files
committed
feat: updates to dev tools UI supporting tailwind/shadcn
1 parent 119ff4b commit ff67040

18 files changed

Lines changed: 1003 additions & 1272 deletions

src/dev/developer_mode/DataBarButton.vue

Lines changed: 51 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<script setup>
22
import { computed } from 'vue'
3+
import { Button } from '@/uikit/components/ui/button'
4+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/uikit/components/ui/tooltip'
5+
import { Database, RefreshCw } from 'lucide-vue-next'
36
import useAPI from '@/core/composables/useAPI'
47
const api = useAPI()
58
@@ -29,47 +32,54 @@ const database_tooltip = computed(() => {
2932
</script>
3033

3134
<template>
32-
<button class="button devbar-button has-tooltip-arrow has-tooltip-bottom" :data-tooltip="database_tooltip">
33-
<FAIcon
34-
icon="fa-solid fa-database"
35-
class="disconnected"
36-
:class="{ connected: api.store.browserEphemeral.dbConnected == true }"
37-
/>
38-
&nbsp;&nbsp;|&nbsp;&nbsp;
39-
<template v-if="!api.store.browserEphemeral.dbConnected">
40-
<FAIcon icon="fa-solid fa-rotate" class="has-text-grey" />
41-
</template>
42-
<template v-else-if="api.store.browserEphemeral.dbChanges && api.store.browserEphemeral.dbConnected">
43-
<FAIcon icon="fa-solid fa-rotate" class="outofsync" />
44-
</template>
45-
<template v-else>
46-
<FAIcon icon="fa-solid fa-rotate" class="insync" />
47-
</template>
48-
<template v-if="!api.store.browserEphemeral.dbConnected">
49-
&nbsp;&nbsp;|&nbsp;&nbsp;
50-
<div class="mt-1">
51-
<CircleProgress
52-
:percentage="Math.round(api.store.browserPersisted.approxDataSize / 1048576) * 100"
53-
:size="12"
54-
:strokeWidth="40"
55-
slicecolor="#aaa"
56-
basecolor="#aaa"
57-
/>
58-
</div>
59-
</template>
60-
<template v-else>
61-
&nbsp;&nbsp;|&nbsp;&nbsp;
62-
<div class="mt-1">
63-
<CircleProgress
64-
:percentage="Math.round(api.store.browserPersisted.approxDataSize / 1048576) * 100"
65-
:size="12"
66-
:strokeWidth="40"
67-
slicecolor="hsl(var(--bulma-button-h), var(--bulma-button-s), calc(var(--bulma-button-background-l) + var(--bulma-button-background-l-delta)))"
68-
basecolor="var(--status-green)"
69-
/>
70-
</div>
71-
</template>
72-
</button>
35+
<TooltipProvider>
36+
<Tooltip>
37+
<TooltipTrigger asChild>
38+
<Button size="menu" variant="outline">
39+
<i-ix-database-filled
40+
style="font-size: 2em"
41+
class="disconnected"
42+
:class="{ connected: api.store.browserEphemeral.dbConnected == true }"
43+
/>
44+
45+
<template v-if="!api.store.browserEphemeral.dbConnected">
46+
<RefreshCw class="has-text-grey" />
47+
</template>
48+
<template v-else-if="api.store.browserEphemeral.dbChanges && api.store.browserEphemeral.dbConnected">
49+
<RefreshCw class="outofsync" />
50+
</template>
51+
<template v-else>
52+
<RefreshCw class="insync" />
53+
</template>
54+
<template v-if="!api.store.browserEphemeral.dbConnected">
55+
<div class="mt-1">
56+
<CircleProgress
57+
:percentage="Math.round(api.store.browserPersisted.approxDataSize / 1048576) * 100"
58+
:size="12"
59+
:strokeWidth="40"
60+
slicecolor="#aaa"
61+
basecolor="#aaa"
62+
/>
63+
</div>
64+
</template>
65+
<template v-else>
66+
<div class="mt-1">
67+
<CircleProgress
68+
:percentage="Math.round(api.store.browserPersisted.approxDataSize / 1048576) * 100"
69+
:size="12"
70+
:strokeWidth="40"
71+
slicecolor="hsl(var(--bulma-button-h), var(--bulma-button-s), calc(var(--bulma-button-background-l) + var(--bulma-button-background-l-delta)))"
72+
basecolor="var(--status-green)"
73+
/>
74+
</div>
75+
</template>
76+
</Button>
77+
</TooltipTrigger>
78+
<TooltipContent side="bottom">
79+
{{ database_tooltip }}
80+
</TooltipContent>
81+
</Tooltip>
82+
</TooltipProvider>
7383
</template>
7484

7585
<style scoped>

0 commit comments

Comments
 (0)