@@ -91,7 +91,7 @@ const Track = ({
{playingTrackIndex === index ? (
+
{String(index + 1).padStart(2, '0')}
)}
@@ -163,7 +163,7 @@ const TrackList = ({ className }: { className?: string }) => {
{/* 底部渐变遮罩 */}
>
diff --git a/packages/web/components/New/PlayingNextMobile.tsx b/packages/web/components/New/PlayingNextMobile.tsx
index 29ccd22..673a22d 100644
--- a/packages/web/components/New/PlayingNextMobile.tsx
+++ b/packages/web/components/New/PlayingNextMobile.tsx
@@ -1,15 +1,82 @@
+import { css, cx } from '@emotion/css'
+import {
+ motion,
+ useMotionValue,
+ useDragControls,
+ AnimatePresence,
+} from 'framer-motion'
+import { useEffect, useState } from 'react'
import { useLockBodyScroll } from 'react-use'
+import { isIosPwa } from '@/web/utils/common'
import PlayingNext from './PlayingNext'
+import { ease } from '@/web/utils/const'
const PlayingNextMobile = () => {
- useLockBodyScroll(true)
+ const [display, setDisplay] = useState(false)
+ const [isDragging, setIsDragging] = useState(false)
+ useLockBodyScroll(isDragging || display)
+
+ const dragControls = useDragControls()
+ const y = useMotionValue('82%')
return (
-
+
+ console.log(info.point.y)}
+ >
+ {/* Indictor */}
+ {
+ setIsDragging(true)
+ dragControls.start(e)
+ }}
+ onDragEnd={() => setIsDragging(false)}
+ dragConstraints={{ top: 0, bottom: 0 }}
+ className={cx(
+ 'mx-7 flex justify-center',
+ css`
+ --height: 30px;
+ bottom: calc(
+ 70px + 64px +
+ ${isIosPwa ? '24px' : 'env(safe-area-inset-bottom)'}
+ ); // 拖动条到导航栏的距离 + 导航栏高度 + safe-area-inset-bottom
+ height: var(--height);
+ `
+ )}
+ layout
+ >
+
+
+
+ {/* List */}
+
+
+
)
}
diff --git a/packages/web/pages/New/Artist/Header/Header.tsx b/packages/web/pages/New/Artist/Header/Header.tsx
index f8f1238..870846a 100644
--- a/packages/web/pages/New/Artist/Header/Header.tsx
+++ b/packages/web/pages/New/Artist/Header/Header.tsx
@@ -23,7 +23,7 @@ const Header = ({ artist }: { artist?: Artist }) => {
>
{
{
`
)}
/>
-
-
+
+
{album.name}
-
+
{album.type}
{album.size > 1 ? `· ${album.size} Tracks` : ''}
@@ -69,8 +69,8 @@ const Video = () => {
`
)}
/>
-
-
+
+
Swedish House Mafia & The Weeknd Live at C...
@@ -84,7 +84,7 @@ const Video = () => {
const LatestRelease = () => {
return (
-
+
Latest Releases
diff --git a/packages/web/utils/common.ts b/packages/web/utils/common.ts
index c0daab0..374aa7a 100644
--- a/packages/web/utils/common.ts
+++ b/packages/web/utils/common.ts
@@ -166,3 +166,4 @@ export const isSafari = /^((?!chrome|android).)*safari/i.test(
export const isPWA =
(navigator as any).standalone ||
window.matchMedia('(display-mode: standalone)').matches
+export const isIosPwa = isIOS && isPWA && isSafari