mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-21 21:33:02 +01:00
* feat: begin upgrading deps, still very buggy * feat: progress * feat: sort all type issues * fix: sort type issues * fix: import sonner styles * fix: nuxt is the enemy * fix: try sorting issue with workflows * fix: update vitest config for dynamic import of path and defineConfig * fix: add missing import * fix: add time out to try and fix issues * fix: add ui:ci:preview task for frontend build in CI mode * fix: i was silly * feat: add go:ci:with-frontend task for CI mode and remove ui:ci:preview from e2e workflow * fix: update baseURL in Playwright config for local testing to use port 7745 * fix: update E2E_BASE_URL and remove wait for timeout in login test for smoother execution
33 lines
932 B
Vue
33 lines
932 B
Vue
<template>
|
|
<Card class="flex flex-col items-center bg-secondary p-3 text-secondary-foreground shadow">
|
|
<CardHeader class="p-0">
|
|
<CardTitle class="text-sm font-medium">{{ title }}</CardTitle>
|
|
</CardHeader>
|
|
<CardContent class="p-0 text-2xl font-bold">
|
|
<Currency v-if="type === 'currency'" :amount="value" />
|
|
<template v-if="type === 'number'">{{ value }}</template>
|
|
</CardContent>
|
|
<CardFooter v-if="subtitle">{{ subtitle }}</CardFooter>
|
|
</Card>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import Currency from "../Currency.vue";
|
|
import type { StatsFormat } from "./types";
|
|
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from "@/components/ui/card";
|
|
|
|
type Props = {
|
|
title: string;
|
|
value: number;
|
|
subtitle?: string;
|
|
type?: StatsFormat;
|
|
};
|
|
|
|
withDefaults(defineProps<Props>(), {
|
|
type: "number",
|
|
subtitle: undefined,
|
|
});
|
|
</script>
|
|
|
|
<style></style>
|