feat: updates

This commit is contained in:
qier222 2022-07-12 22:42:50 +08:00
parent 222fb02355
commit 47e41dea9b
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
24 changed files with 380 additions and 130 deletions

View file

@ -8,14 +8,21 @@ import uiStates from '@/web/states/uiStates'
import { useSnapshot } from 'valtio'
import { AnimatePresence, motion } from 'framer-motion'
import { ease } from '@/web/utils/const'
import { useLocation } from 'react-router-dom'
const Background = () => {
const { hideTopbarBackground } = useSnapshot(uiStates)
const location = useLocation()
const isPageHaveBlurBG =
location.pathname.startsWith('/album/') ||
location.pathname.startsWith('/artist/') ||
location.pathname.startsWith('/playlist/')
const show = !hideTopbarBackground || !isPageHaveBlurBG
return (
<>
<AnimatePresence>
{!hideTopbarBackground && (
{show && (
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}