forked from mirrors/homebox
feat: new dashboard implementation (#168)
* wip: charts.js experimental work * update lock file * wip: frontend redesign * wip: more UI fixes for consistency across themes * cleanup * improve UI log * style updates * fix lint errors
This commit is contained in:
parent
a3954dab0f
commit
6a8a25e3f8
42 changed files with 1690 additions and 296 deletions
28
frontend/components/global/StatCard/StatCard.vue
Normal file
28
frontend/components/global/StatCard/StatCard.vue
Normal file
|
@ -0,0 +1,28 @@
|
|||
<template>
|
||||
<div class="stats bg-neutral shadow rounded-md">
|
||||
<div class="stat text-neutral-content text-center space-y-1 p-3">
|
||||
<div class="stat-title">{{ title }}</div>
|
||||
<div class="stat-value text-2xl">
|
||||
<Currency v-if="type === 'currency'" :amount="value" />
|
||||
<template v-if="type === 'number'">{{ value }}</template>
|
||||
</div>
|
||||
<div v-if="subtitle" class="stat-desc">{{ subtitle }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { StatsFormat } from "./types";
|
||||
|
||||
type Props = {
|
||||
title: string;
|
||||
value: number;
|
||||
subtitle?: string;
|
||||
type?: StatsFormat;
|
||||
};
|
||||
|
||||
withDefaults(defineProps<Props>(), {
|
||||
type: "number",
|
||||
subtitle: undefined,
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue