Skip to content

Commit 7153a03

Browse files
committed
💄 improve dashboard design for dark-mode
1 parent f8748ce commit 7153a03

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

src/components/BarChart.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const series = ref([
7474
</script>
7575

7676
<template>
77-
<VueApexCharts type="bar" :options="chartOptions" height="430" :series="series" />
77+
<VueApexCharts type="bar" :options="chartOptions" height="460" :series="series" />
7878
</template>
7979

8080
<style lang="scss" scoped>

src/components/Card.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
defineProps({
33
shadow: { type: Boolean, default: false },
44
bottomBorder: { type: Boolean, default: false },
5-
color: { type: String, default: '#FC0' },
5+
color: { type: String, required: false },
66
title: { type: String, required: false },
77
})
88
const slots = useSlots()
@@ -16,13 +16,13 @@ const slots = useSlots()
1616
<div class="card-container my-1" :class="{ shadow }">
1717
<div
1818
class="card-content bg-white dark:bg-slate-900 rounded-md shadow-lg drop-shadow-md p-3 relative z-10"
19-
:class="{ 'bottom-border': bottomBorder }" :style="{ 'border-color': color }"
19+
:class="{ 'bottom-border': bottomBorder }" :style="color ? { 'border-color': color } : ''"
2020
>
2121
<div v-if="slots.title">
2222
<slot name="title" />
2323
</div>
2424
<div v-else-if="title">
25-
<h3 class="title font-bold text-dark-400">
25+
<h3 class="title text-dark-400 dark:text-light-800">
2626
{{ title }}
2727
</h3>
2828
</div>
@@ -62,7 +62,7 @@ const slots = useSlots()
6262
6363
.title {
6464
font-size:1.1rem;
65-
font-weight: 600;
65+
font-weight: 500;
6666
margin: .1rem 0.5rem 1.2rem 0.5rem;
6767
}
6868
}

src/components/Dahboard/DashboardPage.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ function random(min: number, max: number): number {
4040
<div>
4141
<div class="flex flex-col lg:flex-row margin-outside pb-3">
4242
<div class="flex flex-col w-full lg:w-1/3">
43-
<Card class="px-2" :title="t('dashboard.summary')">
43+
<Card class="p-2" :title="t('dashboard.summary')">
4444
<LineChart />
4545
</Card>
46-
<Card class="px-2" :title="t('dashboard.summary')">
46+
<Card class="p-2" :title="t('dashboard.summary')">
4747
<DonutChart />
4848
</Card>
4949
</div>
50-
<div class="w-full lg:w-2/3 px-2">
50+
<div class="w-full lg:w-2/3 p-2">
5151
<Card :title="t('dashboard.summary')">
5252
<BarChart />
5353
</Card>

src/components/Dahboard/RecentOrders.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const { renderPrice, renderTag } = useRender()
1212
onMounted(getItems)
1313
1414
function getItems() {
15-
store.getRecentOrders(6)
15+
store.getRecentOrders(7)
1616
}
1717
1818
const columns: DataTableColumns<RowData> = [

src/components/DashboardCard.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const props = defineProps({
44
value: { type: Number, required: true },
55
progress: { type: Number, required: false },
66
bottomBorder: { type: Boolean, required: false },
7-
color: { type: String, required: false, default: '#FC0' },
7+
color: { type: String, required: false },
88
})
99
1010
const value = ref(0)
@@ -59,7 +59,7 @@ onMounted(() => {
5959
<h3 ref="element" class="value">
6060
{{ value }}
6161
</h3>
62-
<h4 class="title">
62+
<h4 class="title text-gray-800 dark:text-gray-200">
6363
{{ props.title }}
6464
</h4>
6565
</section>
@@ -85,7 +85,6 @@ onMounted(() => {
8585
.title {
8686
font-size: 0.9rem;
8787
margin-top: -5px;
88-
color: #707070;
8988
}
9089
}
9190
}

0 commit comments

Comments
 (0)