mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 21:28:06 +00:00
feat: updates
This commit is contained in:
parent
222fb02355
commit
47e41dea9b
24 changed files with 380 additions and 130 deletions
|
|
@ -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 }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue