11<template >
22 <div ref =" dropdownRef" >
33 <div class =" cursor-pointer hover:scale-110 transition-transform" @click =" isDropdownOpen = !isDropdownOpen" >
4- <div v-if =" isAlLeastOneJobRunning" class =" relative" >
5- <div class =" loader " ></div >
6- <div class =" absolute -bottom-1 -right-1 rounded-full bg-lightPrimary w-4 h-4 text-xs flex items-center justify-center text-white" > {{ jobsCount }}</div >
7- </div >
8- <div class =" flex items-center justify-center" v-else-if =" jobs.length > 0" >
4+ <div class =" relative flex items-center justify-center" v-if =" jobs.length > 0" >
95 <Tooltip >
10- <IconCheckCircleOutline class="w-8 h-8 text-green-500 " />
6+ <IconBriefcaseSolid class="w-7 h-7 text-gray-600 hover: text-gray-700 " />
117 <template #tooltip >
128 {{ t('All jobs completed') }}
139 </template >
1410 </Tooltip >
11+ <div
12+ v-if =" isAlLeastOneJobRunning"
13+ class =" ping-animation absolute -bottom-1 -right-1 rounded-full bg-lightPrimary w-4 h-4 text-xs flex items-center justify-center text-white"
14+ >
15+ {{ jobsCount }}
16+ </div >
17+ <div
18+ v-if =" isAlLeastOneJobRunning"
19+ class =" absolute -bottom-1 -right-1 rounded-full bg-lightPrimary w-4 h-4 text-xs flex items-center justify-center text-white"
20+ >
21+ {{ jobsCount }}
22+ </div >
1523 </div >
1624 </div >
1725 <Transition
4048<script setup lang="ts">
4149 import type { AdminUser } from ' adminforth' ;
4250 import { onMounted , onUnmounted , ref , computed } from ' vue' ;
43- import { IconCheckCircleOutline } from ' @iconify-prerendered/vue-flowbite' ;
51+ import { IconCheckCircleOutline , IconBriefcaseSolid } from ' @iconify-prerendered/vue-flowbite' ;
4452 import { Tooltip } from ' @/afcl' ;
4553 import { useI18n } from ' vue-i18n' ;
4654 import JobsList from ' ./JobsList.vue' ;
119127
120128
121129<style scoped lang="scss">
122- .loader {
123- width : 28px ;
124- aspect-ratio : 1 ;
125- border-radius : 50% ;
126- --spinner-color : #1a56db ;
127-
128- background :
129- conic-gradient (
130- from 120deg ,
131- var (--spinner-color ) 0deg 40deg ,
132- transparent 40deg
133- ),
134-
135- conic-gradient (#ccc 0deg 360deg );
136-
137- -webkit-mask : radial-gradient (
138- farthest-side ,
139- transparent calc (100% - 6px ),
140- #000 calc (100% - 5px )
141- );
142- mask : radial-gradient (
143- farthest-side ,
144- transparent calc (100% - 6px ),
145- #000 calc (100% - 5px )
146- );
147-
148- animation : stepRotate 2s infinite ;
149- }
150-
151- @keyframes stepRotate {
152- to { transform : rotate (1turn ); }
130+ .ping-animation {
131+ animation : ping 1s cubic-bezier (0 , 0 , 1 , 1 ) infinite ;
132+ }
133+
134+ @keyframes ping {
135+ 75%, 100% {
136+ transform : scale (2 );
137+ opacity : 0 ;
153138 }
139+ }
154140 </style >
0 commit comments