Files
tehran_taj/apps/user-app-v2/src/components/Spinner.vue
T
s.esmaeiliandClaude Haiku 5.5 532ceee189 feat: move brand name to one config and redesign the accounting card
اپ: نام برند در همه‌ی صفحه‌ها و پیام‌ها یکسان شده و از یک تنظیم مرکزی خوانده می‌شود.
اپ: کارت حسابداری در صفحه‌ی مشتری بازطراحی شد؛ مانده‌ها و وضعیت لینک واضح‌تر نمایش داده می‌شوند.
پنل: کارت حسابداری در پرونده‌ی مشتری بازطراحی شد؛ مانده‌ها، آخرین ارسال و فرم لینک دستی واضح‌تر شده‌اند.
پنل: ستون «کد» در جدول‌ها به‌طور پیش‌فرض پنهان است و از انتخاب ستون‌ها قابل نمایش است.
پنل: تغییر نمایش ستون‌ها در جدول‌ها بلافاصله اعمال می‌شود.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-14 13:31:20 +03:30

119 lines
2.3 KiB
Vue

<!-- Ported from legacy henza_pwa/src/components/spinner.vue -->
<template>
<Spin :spinning="spinning" :tip="tip" :size="(size as 'small' | 'default' | 'large')" :delay="delay" :class="fixed ? '!max-h-screen !fixed' : ''">
<template #indicator>
<img v-if="!indicator" src="/img/brand-logo.png" :alt="brand.nameEn" class="spinner-brand" width="48" height="48" />
<!-- keep-motion: a working spinner, exempt from reduced motion. -->
<div class="loading keep-motion" v-else>
<div class="effect-1 effects"></div>
<div class="effect-2 effects"></div>
<div class="effect-3 effects"></div>
</div>
</template>
<div :class="cls">
<slot />
</div>
</Spin>
</template>
<script setup lang="ts">
import { brand } from '../brand'
import { Spin } from 'ant-design-vue'
withDefaults(
defineProps<{
tip?: string
size?: string
cls?: string
delay?: number
spinning: boolean
indicator?: boolean
fixed?: boolean
}>(),
{ size: 'large', fixed: true },
)
</script>
<style lang="less">
.loading * {
box-sizing: border-box;
}
.loading {
position: relative;
width: 50px;
height: 50px;
border-radius: 50%;
box-sizing: border-box;
border: 3px solid transparent;
}
.loading .effect-1,
.loading .effect-2 {
position: absolute;
width: 50px;
height: 50px;
border: 3px solid transparent;
border-left: 3px solid @secondary;
border-radius: 50%;
box-sizing: border-box;
}
.loading .effect-1 {
animation: rotate 1s ease infinite;
}
.loading .effect-2 {
animation: rotateOpacity 1s ease infinite 0.1s;
}
.loading .effect-3 {
position: absolute;
width: 50px;
height: 50px;
border: 3px solid transparent;
border-left: 3px solid @secondary;
animation: rotateOpacity 1s ease infinite 0.2s;
border-radius: 50%;
box-sizing: border-box;
}
.loading .effects {
transition: all 0.3s ease;
}
@keyframes rotate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(1turn);
}
}
@keyframes rotateOpacity {
0% {
transform: rotate(0deg);
opacity: 0.1;
}
100% {
transform: rotate(1turn);
opacity: 1;
}
}
.spinner-brand {
display: block;
width: 48px;
height: 48px;
object-fit: contain;
border-radius: 8px;
}
.ant-spin-text {
color: @primary;
}
.loading + .ant-spin-text {
margin-top: 24px;
}
</style>