mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-05-18 03:37:28 +08:00
fix: speed test ui
This commit is contained in:
@@ -525,6 +525,11 @@ function PlayPageClient() {
|
|||||||
// 清理URL参数(移除index参数)
|
// 清理URL参数(移除index参数)
|
||||||
if (searchParams.has('index')) {
|
if (searchParams.has('index')) {
|
||||||
const newUrl = new URL(window.location.href);
|
const newUrl = new URL(window.location.href);
|
||||||
|
newUrl.searchParams.set('year', detailData.year || 'unknown');
|
||||||
|
newUrl.searchParams.set(
|
||||||
|
'title',
|
||||||
|
detailData.title || videoTitleRef.current
|
||||||
|
);
|
||||||
newUrl.searchParams.delete('index');
|
newUrl.searchParams.delete('index');
|
||||||
newUrl.searchParams.delete('position');
|
newUrl.searchParams.delete('position');
|
||||||
window.history.replaceState({}, '', newUrl.toString());
|
window.history.replaceState({}, '', newUrl.toString());
|
||||||
|
|||||||
@@ -522,25 +522,26 @@ const EpisodeSelector: React.FC<EpisodeSelectorProps> = ({
|
|||||||
{(() => {
|
{(() => {
|
||||||
const sourceKey = `${source.source}-${source.id}`;
|
const sourceKey = `${source.source}-${source.id}`;
|
||||||
const videoInfo = videoInfoMap.get(sourceKey);
|
const videoInfo = videoInfoMap.get(sourceKey);
|
||||||
|
if (videoInfo) {
|
||||||
if (videoInfo && !videoInfo.hasError) {
|
if (!videoInfo.hasError) {
|
||||||
return (
|
return (
|
||||||
<div className='flex items-end gap-3 text-xs'>
|
<div className='flex items-end gap-3 text-xs'>
|
||||||
<div className='text-green-600 dark:text-green-400 font-medium text-xs'>
|
<div className='text-green-600 dark:text-green-400 font-medium text-xs'>
|
||||||
{videoInfo.loadSpeed}
|
{videoInfo.loadSpeed}
|
||||||
|
</div>
|
||||||
|
<div className='text-orange-600 dark:text-orange-400 font-medium text-xs'>
|
||||||
|
{videoInfo.pingTime}ms
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='text-orange-600 dark:text-orange-400 font-medium text-xs'>
|
);
|
||||||
{videoInfo.pingTime}ms
|
} else {
|
||||||
|
return (
|
||||||
|
<div className='text-red-500/90 dark:text-red-400 font-medium text-xs'>
|
||||||
|
无测速数据
|
||||||
</div>
|
</div>
|
||||||
</div>
|
); // 占位div
|
||||||
);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
|
||||||
<div className='text-red-500/90 dark:text-red-400 font-medium text-xs'>
|
|
||||||
无测速数据
|
|
||||||
</div>
|
|
||||||
); // 占位div
|
|
||||||
})()}
|
})()}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user