fix(frontend): 「アニメーション画像を再生しない」がオンのときにバナー画像・サーバー背景画像がアニメーションしないように (#14243)
* fix: stop animating banner and backgrounds when stop showing animated images is enabled (cherry picked from commit 8fe2596316e9688509745706ea424f0b4bfd4136) * chore: nest ternary (cherry picked from commit 2783fe5f5bd7c0647db9f9b6fb5e000e4f411092) * chore: flip ternary (cherry picked from commit b9d66f824cff373cc53bfa846a56c16f456a6d5b) * update changelog --------- Co-authored-by: Marie <marie@kaifa.ch>
This commit is contained in:
parent
6942a920c8
commit
3331f3972a
4 changed files with 16 additions and 4 deletions
|
|
@ -173,6 +173,7 @@ import { confetti } from '@/scripts/confetti.js';
|
|||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { isFollowingVisibleForMe, isFollowersVisibleForMe } from '@/scripts/isFfVisibleForMe.js';
|
||||
import { useRouter } from '@/router/supplier.js';
|
||||
import { getStaticImageUrl } from '@/scripts/media-proxy.js';
|
||||
|
||||
function calcAge(birthdate: string): number {
|
||||
const date = new Date(birthdate);
|
||||
|
|
@ -220,8 +221,14 @@ watch(moderationNote, async () => {
|
|||
|
||||
const style = computed(() => {
|
||||
if (props.user.bannerUrl == null) return {};
|
||||
return {
|
||||
backgroundImage: `url(${ props.user.bannerUrl })`,
|
||||
if (defaultStore.state.disableShowingAnimatedImages) {
|
||||
return {
|
||||
backgroundImage: `url(${ getStaticImageUrl(props.user.bannerUrl) })`,
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
backgroundImage: `url(${ props.user.bannerUrl })`,
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue