disable animations on more transitions (#8112)

This commit is contained in:
Johann150
2022-01-25 15:18:21 +01:00
committed by GitHub
parent 3f610edc2a
commit e51f59e1b7
23 changed files with 31 additions and 31 deletions

View File

@ -1,5 +1,5 @@
<template>
<transition name="fade" mode="out-in">
<transition :name="$store.state.animation ? 'fade' : ''" mode="out-in">
<div v-if="pending">
<MkLoading/>
</div>

View File

@ -1,6 +1,6 @@
<template>
<div class="mk-notification-toast" :style="{ zIndex }">
<transition name="notification-toast" appear @after-leave="$emit('closed')">
<transition :name="$store.state.animation ? 'notification-toast' : ''" appear @after-leave="$emit('closed')">
<XNotification v-if="showing" :notification="notification" class="notification _acrylic"/>
</transition>
</div>

View File

@ -1,6 +1,6 @@
<template>
<div class="mk-toast">
<transition name="toast" appear @after-leave="emit('closed')">
<transition :name="$store.state.animation ? 'toast' : ''" appear @after-leave="emit('closed')">
<div v-if="showing" class="body _acrylic" :style="{ zIndex }">
<div class="message">
{{ message }}

View File

@ -10,7 +10,7 @@
</button>
</div>
</header>
<transition name="container-toggle"
<transition :name="$store.state.animation ? 'container-toggle' : ''"
@enter="enter"
@after-enter="afterEnter"
@leave="leave"

View File

@ -8,7 +8,7 @@
<template v-else><i class="fas fa-angle-down"></i></template>
</button>
</header>
<transition name="folder-toggle"
<transition :name="$store.state.animation ? 'folder-toggle' : ''"
@enter="enter"
@after-enter="afterEnter"
@leave="leave"

View File

@ -1,5 +1,5 @@
<template>
<transition name="fade" mode="out-in">
<transition :name="$store.state.animation ? 'fade' : ''" mode="out-in">
<MkLoading v-if="fetching"/>
<MkError v-else-if="error" @retry="init()"/>

View File

@ -1,5 +1,5 @@
<template>
<transition name="tooltip" appear @after-leave="$emit('closed')">
<transition :name="$store.state.animation ? 'tooltip' : ''" appear @after-leave="$emit('closed')">
<div v-show="showing" ref="el" class="buebdbiu _acrylic _shadow" :style="{ zIndex, maxWidth: maxWidth + 'px' }">
<slot>{{ text }}</slot>
</div>

View File

@ -1,6 +1,6 @@
<template>
<div class="fgmtyycl" :style="{ zIndex, top: top + 'px', left: left + 'px' }">
<transition name="zoom" @after-leave="$emit('closed')">
<transition :name="$store.state.animation ? 'zoom' : ''" @after-leave="$emit('closed')">
<MkUrlPreview v-if="showing" class="_popup _shadow" :url="url"/>
</transition>
</div>

View File

@ -7,7 +7,7 @@
<iframe ref="tweet" scrolling="no" frameborder="no" :style="{ position: 'relative', width: '100%', height: `${tweetHeight}px` }" :src="`https://platform.twitter.com/embed/index.html?embedId=${embedId}&amp;hideCard=false&amp;hideThread=false&amp;lang=en&amp;theme=${$store.state.darkMode ? 'dark' : 'light'}&amp;id=${tweetId}`"></iframe>
</div>
<div v-else v-size="{ max: [400, 350] }" class="mk-url-preview">
<transition name="zoom" mode="out-in">
<transition :name="$store.state.animation ? 'zoom' : ''" mode="out-in">
<component :is="self ? 'MkA' : 'a'" v-if="!fetching" :class="{ compact }" :[attr]="self ? url.substr(local.length) : url" rel="nofollow noopener" :target="target" :title="url">
<div v-if="thumbnail" class="thumbnail" :style="`background-image: url('${thumbnail}')`">
<button v-if="!playerEnabled && player.url" class="_button" :title="$ts.enablePlayer" @click.prevent="playerEnabled = true"><i class="fas fa-play-circle"></i></button>

View File

@ -1,5 +1,5 @@
<template>
<transition name="popup" appear @after-leave="$emit('closed')">
<transition :name="$store.state.animation ? 'popup' : ''" appear @after-leave="$emit('closed')">
<div v-if="showing" class="fxxzrfni _popup _shadow" :style="{ zIndex, top: top + 'px', left: left + 'px' }" @mouseover="() => { $emit('mouseover'); }" @mouseleave="() => { $emit('mouseleave'); }">
<div v-if="fetched" class="info">
<div class="banner" :style="user.bannerUrl ? `background-image: url(${user.bannerUrl})` : ''"></div>