Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

Commit 167ed5b

Browse files
authored
refactor: improve ui (#113)
1 parent 34d514b commit 167ed5b

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

src/client/components/ComponentTreeNode.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const { isSelected, select, isExpanded, toggleExpand } = useComponent(props.data
2626
isSelected ? 'vue-tag-symbol-active' : 'vue-tag-symbol',
2727
]"
2828
>&lt;</span>
29-
<span :class="[isSelected ? 'text-white' : 'vue-block-text']">
29+
<span :class="[isSelected && 'text-white']">
3030
{{ data.name }}
3131
</span>
3232
<span

src/client/logic/routes.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type RouteRecordTags = {
2727
const CYAN_400 = 0x22D3EE
2828
const ORANGE_400 = 0xFB923C
2929
// const GRAY_100 = 0xf4f4f5
30-
const DARK = 0x666666
30+
const GRAY_300 = 0xC4C4C4
3131

3232
const LAYER_ID = 'router'
3333
// export const router = ref<Router>()
@@ -52,7 +52,7 @@ export const activeRouteRecordMatcherState = computed(() => {
5252
const state = routeRecordMatcherState.value?.[activeRouteRecordIndex.value]?.state
5353
return {
5454
key: 'options',
55-
value: state,
55+
value: state!,
5656
}
5757
})
5858

@@ -112,7 +112,7 @@ function formatRouteRecordForInspector(
112112
typeof record.redirect === 'string'
113113
? `redirect: ${record.redirect}`
114114
: 'redirects',
115-
bgColor: DARK,
115+
bgColor: GRAY_300,
116116
})
117117
}
118118

src/client/pages/pinia.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,21 @@ const data = computed(() => {
3131
<template>
3232
<div h-screen n-panel-grids>
3333
<Splitpanes>
34-
<Pane border="r base">
34+
<Pane border="r base" :size="40">
3535
<div h-screen select-none overflow-scroll p-2 class="no-scrollbar">
3636
<div
3737
v-for="(item, index) in piniaStoresCategory" :key="index" vue-block
3838
:class="[activeIndex === index ? 'vue-block-active' : 'vue-block-hover']" @click="select(index)"
3939
>
4040
<h3 vue-block-title>
41-
<span :class="[activeIndex === index ? 'text-white' : 'vue-block-text']">
41+
<span :class="[activeIndex === index && 'text-white']">
4242
{{ item }}
4343
</span>
4444
</h3>
4545
</div>
4646
</div>
4747
</Pane>
48-
<Pane>
48+
<Pane :size="60">
4949
<div h-screen select-none overflow-scroll p-2 class="no-scrollbar">
5050
<StateFields v-for="(item, index) in data" :id="index" :key="index" :data="item" />
5151
</div>

src/client/pages/routes.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { activeRouteRecordIndex, activeRouteRecordMatcherState, routeRecordMatch
77
<template>
88
<div v-if="router" h-screen n-panel-grids>
99
<Splitpanes>
10-
<Pane border="r base">
10+
<Pane border="r base" size="40">
1111
<div h-screen select-none overflow-scroll p-2 class="no-scrollbar">
1212
<div
1313
v-for="(item, index) in routeRecordMatcherState"
@@ -17,15 +17,15 @@ import { activeRouteRecordIndex, activeRouteRecordMatcherState, routeRecordMatch
1717
@click="toggleRouteRecordMatcher(index)"
1818
>
1919
<h3 vue-block-title>
20-
<span :class="[activeRouteRecordIndex === index ? 'text-white' : 'vue-block-text']">
20+
<span :class="[activeRouteRecordIndex === index && 'text-white']">
2121
{{ item.path }}
2222
<template
2323
v-for="(tag, childIndex) in item.tags"
2424
>
2525
<VBadge
2626
v-if="tag.label"
2727
:key="childIndex"
28-
text-black
28+
color="white/90 dark:black/90"
2929
:style="{
3030
backgroundColor: `#${tag.bgColor.toString(16)}`,
3131
}"
@@ -38,7 +38,7 @@ import { activeRouteRecordIndex, activeRouteRecordMatcherState, routeRecordMatch
3838
</div>
3939
</div>
4040
</Pane>
41-
<Pane>
41+
<Pane size="60">
4242
<div h-screen select-none overflow-scroll p-2 class="no-scrollbar">
4343
<StateFields :data="activeRouteRecordMatcherState" />
4444
</div>

src/client/pages/timeline.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {
2626
@click="toggleTimelineLayer(item.id)"
2727
>
2828
<h3 vue-block-title>
29-
<span truncate :class="[activeLayerId === item.id ? 'text-white' : 'vue-block-text']">
29+
<span truncate :class="[activeLayerId === item.id && 'text-white']">
3030
{{ item.label }}
3131
</span>
3232
</h3>

src/client/uno.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ export default defineConfig({
2929
'vue-block-hover': 'hover:dark:bg-[#2c3e50] hover:bg-[#c2e9d7]',
3030
'vue-block-active': 'bg-[#3ba776] text-white',
3131
'vue-block-text': 'text-#42b983',
32-
'vue-block-title': 'flex items-center pl-2 text-sm font-400 h-8 lh-8',
33-
'vue-block': 'mb-2 max-w-90% cursor-pointer rounded',
32+
'vue-block-title': 'flex items-center pl-2 text-sm font-400 lh-8',
33+
'vue-block': 'mb-2 cursor-pointer',
3434

3535
// Vue tag
3636
'vue-tag-symbol': 'text-gray-400 dark:text-gray-600',

0 commit comments

Comments
 (0)