调整更多推荐和豆瓣评论的边距
This commit is contained in:
@@ -72,13 +72,13 @@ export async function GET(request: NextRequest) {
|
|||||||
|
|
||||||
if (metaInfo && metaInfo.folders) {
|
if (metaInfo && metaInfo.folders) {
|
||||||
openlistResults = Object.entries(metaInfo.folders)
|
openlistResults = Object.entries(metaInfo.folders)
|
||||||
.filter(([key, info]: [string, any]) => {
|
.filter(([folderName, info]: [string, any]) => {
|
||||||
const matchFolder = info.folderName.toLowerCase().includes(query.toLowerCase());
|
const matchFolder = folderName.toLowerCase().includes(query.toLowerCase());
|
||||||
const matchTitle = info.title.toLowerCase().includes(query.toLowerCase());
|
const matchTitle = info.title.toLowerCase().includes(query.toLowerCase());
|
||||||
return matchFolder || matchTitle;
|
return matchFolder || matchTitle;
|
||||||
})
|
})
|
||||||
.map(([key, info]: [string, any]) => ({
|
.map(([folderName, info]: [string, any]) => ({
|
||||||
id: key,
|
id: folderName,
|
||||||
source: 'openlist',
|
source: 'openlist',
|
||||||
source_name: '私人影库',
|
source_name: '私人影库',
|
||||||
title: info.title,
|
title: info.title,
|
||||||
|
|||||||
@@ -5214,10 +5214,10 @@ function PlayPageClient() {
|
|||||||
|
|
||||||
{/* 豆瓣推荐区域 */}
|
{/* 豆瓣推荐区域 */}
|
||||||
{videoDoubanId !== 0 && enableComments && (
|
{videoDoubanId !== 0 && enableComments && (
|
||||||
<div className='mt-6 px-4'>
|
<div className='mt-6 -mx-3 md:mx-0 md:px-4'>
|
||||||
<div className='bg-white/50 dark:bg-gray-800/50 backdrop-blur-sm rounded-xl border border-gray-200/50 dark:border-gray-700/50 overflow-hidden'>
|
<div className='bg-white/50 dark:bg-gray-800/50 backdrop-blur-sm rounded-xl border border-gray-200/50 dark:border-gray-700/50 overflow-hidden'>
|
||||||
{/* 标题 */}
|
{/* 标题 */}
|
||||||
<div className='px-6 py-4 border-b border-gray-200 dark:border-gray-700'>
|
<div className='px-3 md:px-6 py-4 border-b border-gray-200 dark:border-gray-700'>
|
||||||
<h3 className='text-lg font-semibold text-gray-900 dark:text-white flex items-center gap-2'>
|
<h3 className='text-lg font-semibold text-gray-900 dark:text-white flex items-center gap-2'>
|
||||||
<svg className='w-5 h-5' fill='currentColor' viewBox='0 0 24 24'>
|
<svg className='w-5 h-5' fill='currentColor' viewBox='0 0 24 24'>
|
||||||
<path d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/>
|
<path d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/>
|
||||||
@@ -5227,7 +5227,7 @@ function PlayPageClient() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 推荐内容 */}
|
{/* 推荐内容 */}
|
||||||
<div className='p-6'>
|
<div className='px-3 pt-3 md:px-6 md:pt-6'>
|
||||||
<DoubanRecommendations doubanId={videoDoubanId} />
|
<DoubanRecommendations doubanId={videoDoubanId} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -5236,10 +5236,10 @@ function PlayPageClient() {
|
|||||||
|
|
||||||
{/* 豆瓣评论区域 */}
|
{/* 豆瓣评论区域 */}
|
||||||
{videoDoubanId !== 0 && enableComments && (
|
{videoDoubanId !== 0 && enableComments && (
|
||||||
<div className='mt-6 px-4'>
|
<div className='mt-6 -mx-3 md:mx-0 md:px-4'>
|
||||||
<div className='bg-white/50 dark:bg-gray-800/50 backdrop-blur-sm rounded-xl border border-gray-200/50 dark:border-gray-700/50 overflow-hidden'>
|
<div className='bg-white/50 dark:bg-gray-800/50 backdrop-blur-sm rounded-xl border border-gray-200/50 dark:border-gray-700/50 overflow-hidden'>
|
||||||
{/* 标题 */}
|
{/* 标题 */}
|
||||||
<div className='px-6 py-4 border-b border-gray-200 dark:border-gray-700'>
|
<div className='px-3 md:px-6 py-4 border-b border-gray-200 dark:border-gray-700'>
|
||||||
<h3 className='text-lg font-semibold text-gray-900 dark:text-white flex items-center gap-2'>
|
<h3 className='text-lg font-semibold text-gray-900 dark:text-white flex items-center gap-2'>
|
||||||
<svg className='w-5 h-5' fill='currentColor' viewBox='0 0 24 24'>
|
<svg className='w-5 h-5' fill='currentColor' viewBox='0 0 24 24'>
|
||||||
<path d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z'/>
|
<path d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z'/>
|
||||||
@@ -5249,7 +5249,7 @@ function PlayPageClient() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 评论内容 */}
|
{/* 评论内容 */}
|
||||||
<div className='p-6'>
|
<div className='p-3 md:p-6'>
|
||||||
<DoubanComments doubanId={videoDoubanId} />
|
<DoubanComments doubanId={videoDoubanId} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ export default function DoubanRecommendations({ doubanId }: DoubanRecommendation
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollableRow scrollDistance={600}>
|
<ScrollableRow scrollDistance={600} bottomPadding='pb-2'>
|
||||||
{recommendations.map((rec) => (
|
{recommendations.map((rec) => (
|
||||||
<div
|
<div
|
||||||
key={rec.doubanId}
|
key={rec.doubanId}
|
||||||
|
|||||||
@@ -4,11 +4,13 @@ import { useEffect, useRef, useState } from 'react';
|
|||||||
interface ScrollableRowProps {
|
interface ScrollableRowProps {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
scrollDistance?: number;
|
scrollDistance?: number;
|
||||||
|
bottomPadding?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ScrollableRow({
|
export default function ScrollableRow({
|
||||||
children,
|
children,
|
||||||
scrollDistance = 1000,
|
scrollDistance = 1000,
|
||||||
|
bottomPadding = 'pb-12 sm:pb-14',
|
||||||
}: ScrollableRowProps) {
|
}: ScrollableRowProps) {
|
||||||
const containerRef = useRef<HTMLDivElement>(null);
|
const containerRef = useRef<HTMLDivElement>(null);
|
||||||
const [showLeftScroll, setShowLeftScroll] = useState(false);
|
const [showLeftScroll, setShowLeftScroll] = useState(false);
|
||||||
@@ -102,7 +104,7 @@ export default function ScrollableRow({
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
ref={containerRef}
|
ref={containerRef}
|
||||||
className='flex space-x-6 overflow-x-auto scrollbar-hide py-1 sm:py-2 pb-12 sm:pb-14 px-4 sm:px-6'
|
className={`flex space-x-6 overflow-x-auto scrollbar-hide py-1 sm:py-2 ${bottomPadding} px-4 sm:px-6`}
|
||||||
onScroll={checkScroll}
|
onScroll={checkScroll}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
Reference in New Issue
Block a user