mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
## Summary Adds the [tailwind lint plugin](https://github.com/francoismassart/eslint-plugin-tailwindcss/?tab=readme-ov-file#eslint-plugin-tailwindcss) and fixes the currently fixable rules ([v4 is still in beta](https://github.com/francoismassart/eslint-plugin-tailwindcss/?tab=readme-ov-file#about-tailwind-css-4-support)). ## Changes - **What**: Enforces things like consistent class order, and eventually can prohibit extra classes that could be utilities instead - **Dependencies**: The plugin and its types ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-5984-Lint-Add-tailwind-linter-2866d73d365081d89db0d998232533bb) by [Unito](https://www.unito.io) --------- Co-authored-by: GitHub Action <action@github.com>
40 lines
1.1 KiB
Vue
40 lines
1.1 KiB
Vue
<template>
|
|
<div v-if="balanceLoading" class="flex items-center gap-1">
|
|
<div class="flex items-center gap-2">
|
|
<Skeleton shape="circle" width="1.5rem" height="1.5rem" />
|
|
</div>
|
|
<div class="flex-1"></div>
|
|
<Skeleton width="8rem" height="2rem" />
|
|
</div>
|
|
<div v-else class="flex items-center gap-1">
|
|
<Tag
|
|
severity="secondary"
|
|
icon="pi pi-dollar"
|
|
rounded
|
|
class="p-1 text-amber-400"
|
|
/>
|
|
<div :class="textClass">{{ formattedBalance }}</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import Skeleton from 'primevue/skeleton'
|
|
import Tag from 'primevue/tag'
|
|
import { computed } from 'vue'
|
|
|
|
import { useFirebaseAuthStore } from '@/stores/firebaseAuthStore'
|
|
import { formatMetronomeCurrency } from '@/utils/formatUtil'
|
|
|
|
const { textClass } = defineProps<{
|
|
textClass?: string
|
|
}>()
|
|
|
|
const authStore = useFirebaseAuthStore()
|
|
const balanceLoading = computed(() => authStore.isFetchingBalance)
|
|
|
|
const formattedBalance = computed(() => {
|
|
if (!authStore.balance) return '0.00'
|
|
return formatMetronomeCurrency(authStore.balance.amount_micros, 'usd')
|
|
})
|
|
</script>
|