fix: don't animate indicator dot if animation is off

Closes #10372
This commit is contained in:
ThatOneCalculator 2023-06-27 19:25:01 -07:00
parent e53d1f6bdc
commit ad62cadb7d
No known key found for this signature in database
GPG key ID: 8703CACD01000000
7 changed files with 102 additions and 13 deletions

View file

@ -29,7 +29,12 @@
> >
<i class="icon" :class="item.icon"></i> <i class="icon" :class="item.icon"></i>
<div class="text">{{ item.text }}</div> <div class="text">{{ item.text }}</div>
<span v-if="item.indicate" class="indicator" <span
v-if="item.indicate"
class="indicator"
:class="{
animateIndicator: $store.state.animation,
}"
><i class="ph-circle ph-fill"></i ><i class="ph-circle ph-fill"></i
></span> ></span>
</button> </button>
@ -41,7 +46,12 @@
> >
<i class="icon" :class="item.icon"></i> <i class="icon" :class="item.icon"></i>
<div class="text">{{ item.text }}</div> <div class="text">{{ item.text }}</div>
<span v-if="item.indicate" class="indicator" <span
v-if="item.indicate"
class="indicator"
:class="{
animateIndicator: $store.state.animation,
}"
><i class="ph-circle ph-fill"></i ><i class="ph-circle ph-fill"></i
></span> ></span>
</MkA> </MkA>
@ -163,13 +173,16 @@ function close() {
left: 32px; left: 32px;
color: var(--indicator); color: var(--indicator);
font-size: 8px; font-size: 8px;
animation: blink 1s infinite;
@media (max-width: 500px) { @media (max-width: 500px) {
top: 16px; top: 16px;
left: 16px; left: 16px;
} }
} }
> .animateIndicator {
animation: blink 1s infinite;
}
} }
} }

View file

@ -52,7 +52,12 @@
<span :style="item.textStyle || ''">{{ <span :style="item.textStyle || ''">{{
item.text item.text
}}</span> }}</span>
<span v-if="item.indicate" class="indicator" <span
v-if="item.indicate"
class="indicator"
:class="{
animateIndicator: $store.state.animation,
}"
><i class="ph-circle ph-fill"></i ><i class="ph-circle ph-fill"></i
></span> ></span>
</MkA> </MkA>
@ -74,7 +79,12 @@
<span :style="item.textStyle || ''">{{ <span :style="item.textStyle || ''">{{
item.text item.text
}}</span> }}</span>
<span v-if="item.indicate" class="indicator" <span
v-if="item.indicate"
class="indicator"
:class="{
animateIndicator: $store.state.animation,
}"
><i class="ph-circle ph-fill"></i ><i class="ph-circle ph-fill"></i
></span> ></span>
</a> </a>
@ -92,7 +102,12 @@
class="avatar" class="avatar"
disableLink disableLink
/><MkUserName :user="item.user" /> /><MkUserName :user="item.user" />
<span v-if="item.indicate" class="indicator" <span
v-if="item.indicate"
class="indicator"
:class="{
animateIndicator: $store.state.animation,
}"
><i class="ph-circle ph-fill"></i ><i class="ph-circle ph-fill"></i
></span> ></span>
</button> </button>
@ -158,7 +173,12 @@
<span :style="item.textStyle || ''">{{ <span :style="item.textStyle || ''">{{
item.text item.text
}}</span> }}</span>
<span v-if="item.indicate" class="indicator" <span
v-if="item.indicate"
class="indicator"
:class="{
animateIndicator: $store.state.animation,
}"
><i class="ph-circle ph-fill"></i ><i class="ph-circle ph-fill"></i
></span> ></span>
</button> </button>
@ -483,6 +503,9 @@ onBeforeUnmount(() => {
left: 13px; left: 13px;
color: var(--indicator); color: var(--indicator);
font-size: 12px; font-size: 12px;
}
> .animateIndicator {
animation: blink 1s infinite; animation: blink 1s infinite;
} }
} }

View file

@ -710,6 +710,15 @@ hr {
transform: scale3d(1, 1, 1); transform: scale3d(1, 1, 1);
} }
} }
@keyframes blink {
0% {
opacity: 1;
}
100% {
opacity: 1;
}
}
} }
._anime_bounce { ._anime_bounce {

View file

@ -62,6 +62,9 @@
<span <span
v-if="navbarItemDef[item].indicated" v-if="navbarItemDef[item].indicated"
class="indicator" class="indicator"
:class="{
animateIndicator: $store.state.animation,
}"
><i class="icon ph-circle ph-fill"></i ><i class="icon ph-circle ph-fill"></i
></span> ></span>
</component> </component>
@ -82,7 +85,10 @@
class="icon ph-dots-three-outline ph-bold ph-lg ph-fw ph-lg" class="icon ph-dots-three-outline ph-bold ph-lg ph-fw ph-lg"
></i ></i
><span class="text">{{ i18n.ts.more }}</span> ><span class="text">{{ i18n.ts.more }}</span>
<span v-if="otherMenuItemIndicated" class="indicator" <span
v-if="otherMenuItemIndicated"
class="indicator"
:class="{ animateIndicator: $store.state.animation }"
><i class="icon ph-circle ph-fill"></i ><i class="icon ph-circle ph-fill"></i
></span> ></span>
</button> </button>
@ -341,6 +347,9 @@ function more() {
left: 20px; left: 20px;
color: var(--navIndicator); color: var(--navIndicator);
font-size: 8px; font-size: 8px;
}
> .animateIndicator {
animation: blink 1s infinite; animation: blink 1s infinite;
} }

View file

@ -66,6 +66,9 @@
<span <span
v-if="navbarItemDef[item].indicated" v-if="navbarItemDef[item].indicated"
class="indicator" class="indicator"
:class="{
animateIndicator: $store.state.animation,
}"
><i class="icon ph-circle ph-fill"></i ><i class="icon ph-circle ph-fill"></i
></span> ></span>
</component> </component>
@ -88,6 +91,7 @@
updateAvailable updateAvailable
" "
class="indicator" class="indicator"
:class="{ animateIndicator: $store.state.animation }"
></span ></span
><i class="icon ph-door ph-bold ph-fw ph-lg"></i ><i class="icon ph-door ph-bold ph-fw ph-lg"></i
><span class="text">{{ i18n.ts.controlPanel }}</span> ><span class="text">{{ i18n.ts.controlPanel }}</span>
@ -102,7 +106,10 @@
class="icon ph-dots-three-outline ph-bold ph-fw ph-lg" class="icon ph-dots-three-outline ph-bold ph-fw ph-lg"
></i ></i
><span class="text">{{ i18n.ts.more }}</span> ><span class="text">{{ i18n.ts.more }}</span>
<span v-if="otherMenuItemIndicated" class="indicator" <span
v-if="otherMenuItemIndicated"
class="indicator"
:class="{ animateIndicator: $store.state.animation }"
><i class="icon ph-circle ph-fill"></i ><i class="icon ph-circle ph-fill"></i
></span> ></span>
</button> </button>
@ -419,6 +426,9 @@ function more(ev: MouseEvent) {
left: 20px; left: 20px;
color: var(--navIndicator); color: var(--navIndicator);
font-size: 8px; font-size: 8px;
}
> .animateIndicator {
animation: blink 1s infinite; animation: blink 1s infinite;
} }
@ -602,6 +612,9 @@ function more(ev: MouseEvent) {
left: 24px; left: 24px;
color: var(--navIndicator); color: var(--navIndicator);
font-size: 8px; font-size: 8px;
}
> .animateIndicator {
animation: blink 1s infinite; animation: blink 1s infinite;
} }

View file

@ -119,7 +119,10 @@
@click="drawerMenuShowing = true" @click="drawerMenuShowing = true"
> >
<i class="ph-list ph-bold ph-lg"></i <i class="ph-list ph-bold ph-lg"></i
><span v-if="menuIndicated" class="indicator" ><span
v-if="menuIndicated"
class="indicator"
:class="{ animateIndicator: $store.state.animation }"
><i class="ph-circle ph-fill"></i ><i class="ph-circle ph-fill"></i
></span> ></span>
</button> </button>
@ -136,7 +139,10 @@
@click="mainRouter.push('/my/notifications')" @click="mainRouter.push('/my/notifications')"
> >
<i class="ph-bell ph-bold ph-lg"></i <i class="ph-bell ph-bold ph-lg"></i
><span v-if="$i?.hasUnreadNotification" class="indicator" ><span
v-if="$i?.hasUnreadNotification"
class="indicator"
:class="{ animateIndicator: $store.state.animation }"
><i class="ph-circle ph-fill"></i ><i class="ph-circle ph-fill"></i
></span> ></span>
</button> </button>
@ -551,6 +557,9 @@ async function deleteProfile() {
left: 0; left: 0;
color: var(--indicator); color: var(--indicator);
font-size: 16px; font-size: 16px;
}
> .animateIndicator {
animation: blink 1s infinite; animation: blink 1s infinite;
} }

View file

@ -39,7 +39,10 @@
> >
<div class="button-wrapper"> <div class="button-wrapper">
<i class="ph-list ph-bold ph-lg"></i <i class="ph-list ph-bold ph-lg"></i
><span v-if="menuIndicated" class="indicator" ><span
v-if="menuIndicated"
class="indicator"
:class="{ animateIndicator: $store.state.animation }"
><i class="ph-circle ph-fill"></i ><i class="ph-circle ph-fill"></i
></span> ></span>
</div> </div>
@ -74,7 +77,10 @@
:class="buttonAnimIndex === 1 ? 'on' : ''" :class="buttonAnimIndex === 1 ? 'on' : ''"
> >
<i class="ph-bell ph-bold ph-lg"></i <i class="ph-bell ph-bold ph-lg"></i
><span v-if="$i?.hasUnreadNotification" class="indicator" ><span
v-if="$i?.hasUnreadNotification"
class="indicator"
:class="{ animateIndicator: $store.state.animation }"
><i class="ph-circle ph-fill"></i ><i class="ph-circle ph-fill"></i
></span> ></span>
</div> </div>
@ -95,6 +101,7 @@
><span ><span
v-if="$i?.hasUnreadMessagingMessage" v-if="$i?.hasUnreadMessagingMessage"
class="indicator" class="indicator"
:class="{ animateIndicator: $store.state.animation }"
><i class="ph-circle ph-fill"></i ><i class="ph-circle ph-fill"></i
></span> ></span>
</div> </div>
@ -692,6 +699,9 @@ console.log(mainRouter.currentRoute.value.name);
left: 0; left: 0;
color: var(--indicator); color: var(--indicator);
font-size: 16px; font-size: 16px;
}
> .animateIndicator {
animation: blink 1s infinite; animation: blink 1s infinite;
} }
} }
@ -713,6 +723,9 @@ console.log(mainRouter.currentRoute.value.name);
left: 0; left: 0;
color: var(--indicator); color: var(--indicator);
font-size: 16px; font-size: 16px;
}
> .animateIndicator {
animation: blink 1s infinite; animation: blink 1s infinite;
} }