mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-10-07 18:26:37 +08:00
修复转发暂停问题 增加安卓apk
This commit is contained in:
@@ -0,0 +1,136 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="./vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>哆啦A梦</title>
|
||||
<script>
|
||||
// 防止暗黑模式闪烁:在页面加载前立即应用系统主题
|
||||
(function() {
|
||||
// 立即检测系统主题并应用
|
||||
const isDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
|
||||
// 立即设置主题类,避免闪烁
|
||||
if (isDarkMode) {
|
||||
document.documentElement.classList.add('dark');
|
||||
document.documentElement.style.colorScheme = 'dark';
|
||||
} else {
|
||||
document.documentElement.classList.remove('dark');
|
||||
document.documentElement.style.colorScheme = 'light';
|
||||
}
|
||||
|
||||
// 监听系统主题变化
|
||||
if (window.matchMedia) {
|
||||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', function(e) {
|
||||
if (e.matches) {
|
||||
document.documentElement.classList.add('dark');
|
||||
document.documentElement.style.colorScheme = 'dark';
|
||||
} else {
|
||||
document.documentElement.classList.remove('dark');
|
||||
document.documentElement.style.colorScheme = 'light';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 检测H5模式并设置标记,避免布局切换时的闪屏
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const isMobileBrowser = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const isH5Param = urlParams.get('h5') === 'true';
|
||||
|
||||
if (isMobile || isMobileBrowser || isH5Param) {
|
||||
document.documentElement.classList.add('h5-mode');
|
||||
} else {
|
||||
document.documentElement.classList.add('pc-mode');
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<style>
|
||||
/* 防止页面闪烁的基础样式 */
|
||||
:root {
|
||||
--toaster-bg: #ffffff;
|
||||
--toaster-color: #000000;
|
||||
--toaster-border: #e5e7eb;
|
||||
}
|
||||
|
||||
html.dark {
|
||||
--toaster-bg: #374151;
|
||||
--toaster-color: #ffffff;
|
||||
--toaster-border: #4b5563;
|
||||
}
|
||||
|
||||
/* 默认浅色主题样式 */
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
transition: background-color 0.2s ease, color 0.2s ease;
|
||||
}
|
||||
|
||||
/* 暗色主题样式 */
|
||||
html.dark body {
|
||||
background-color: #000000;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#root {
|
||||
min-height: 100vh;
|
||||
background-color: inherit;
|
||||
}
|
||||
|
||||
/* 防止加载时的闪烁 */
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 确保在主题切换时平滑过渡 */
|
||||
html {
|
||||
transition: color-scheme 0.2s ease;
|
||||
}
|
||||
|
||||
/* 防止布局切换时的闪屏 */
|
||||
.h5-mode #root {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.h5-mode.dark #root {
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
.pc-mode #root {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.pc-mode.dark #root {
|
||||
background-color: #000000;
|
||||
}
|
||||
</style>
|
||||
<meta key="title" content="哆啦A梦" property="og:title" />
|
||||
<meta
|
||||
content="哆啦A梦"
|
||||
property="og:description"
|
||||
/>
|
||||
<meta
|
||||
content="哆啦A梦"
|
||||
name="description"
|
||||
/>
|
||||
<meta
|
||||
key="viewport"
|
||||
content="viewport-fit=cover, width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
|
||||
name="viewport"
|
||||
/>
|
||||
<link href="./assets/favicon-DI5FVxIz.ico" rel="icon" />
|
||||
<script type="module" crossorigin src="./assets/index-jxskBxXq.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-DXlBHwCy.css">
|
||||
<script type="module">import.meta.url;import("_").catch(()=>1);(async function*(){})().next();if(location.protocol!="file:"){window.__vite_is_modern_browser=true}</script>
|
||||
<script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
|
||||
<script nomodule crossorigin id="vite-legacy-polyfill" src="./assets/polyfills-legacy-sZVJv9Pp.js"></script>
|
||||
<script nomodule crossorigin id="vite-legacy-entry" data-src="./assets/index-legacy-OLEVtAva.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user