mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-26 15:16:25 +01:00
fix: remove some of the logs from the console so its more usable
This commit is contained in:
@@ -210,8 +210,6 @@
|
||||
}))
|
||||
);
|
||||
|
||||
console.log(headers.value);
|
||||
|
||||
const toggleHeader = (value: string) => {
|
||||
const header = headers.value.find(h => h.value === value);
|
||||
if (header) {
|
||||
|
||||
@@ -1,21 +1,41 @@
|
||||
<template>
|
||||
{{ value }}
|
||||
<Suspense>
|
||||
<template #default>
|
||||
{{ formattedValue }}
|
||||
</template>
|
||||
<template #fallback> Loading... </template>
|
||||
</Suspense>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
type Props = {
|
||||
amount: string | number;
|
||||
};
|
||||
|
||||
const props = defineProps<Props>();
|
||||
|
||||
const fmt = await useFormatCurrency();
|
||||
const fmt = ref(null);
|
||||
|
||||
const value = computed(() => {
|
||||
if (!props.amount || props.amount === "0") {
|
||||
return fmt(0);
|
||||
const loadFormatter = async () => {
|
||||
fmt.value = await useFormatCurrency();
|
||||
};
|
||||
|
||||
loadFormatter();
|
||||
|
||||
const formattedValue = computed(() => {
|
||||
if (!fmt.value) {
|
||||
return t("global.loading");
|
||||
}
|
||||
|
||||
return fmt(props.amount);
|
||||
if (!props.amount || props.amount === "0") {
|
||||
return fmt.value(0);
|
||||
}
|
||||
|
||||
return fmt.value(props.amount);
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -156,7 +156,8 @@
|
||||
"update": "Update",
|
||||
"value": "Value",
|
||||
"version": "Version: { version }",
|
||||
"welcome": "Welcome, { username }"
|
||||
"welcome": "Welcome, { username }",
|
||||
"loading": "Loading..."
|
||||
},
|
||||
"home": {
|
||||
"labels": "Labels",
|
||||
|
||||
Reference in New Issue
Block a user