187 lines
8.1 KiB
HTML
187 lines
8.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>智能保镖 - 直播管理系统</title>
|
|
<script src="./js/tailwindcss.js"></script>
|
|
<link href="./fontawesome-free-6.4.0-web/css/all.css" rel="stylesheet">
|
|
<script>
|
|
tailwind.config = {
|
|
theme: {
|
|
extend: {
|
|
colors: {
|
|
primary: '#165DFF',
|
|
secondary: '#36CFC9',
|
|
neutral: '#F5F7FA',
|
|
'neutral-dark': '#4E5969',
|
|
success: '#00B42A',
|
|
warning: '#FF7D00',
|
|
danger: '#F53F3F',
|
|
},
|
|
fontFamily: {
|
|
inter: ['Inter', 'system-ui', 'sans-serif'],
|
|
},
|
|
spacing: {
|
|
'4': '1rem',
|
|
'3': '0.75rem',
|
|
'8': '2rem',
|
|
'10': '2.5rem',
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<style type="text/tailwindcss">
|
|
@layer utilities {
|
|
.content-auto {
|
|
content-visibility: auto;
|
|
}
|
|
.sidebar-item {
|
|
@apply flex items-center gap-3 px-4 py-3 rounded-lg transition-all duration-200 hover:bg-primary/10 hover:text-primary;
|
|
}
|
|
.sidebar-item.active {
|
|
@apply bg-primary/10 text-primary font-medium;
|
|
}
|
|
.rule-card {
|
|
@apply bg-white rounded-xl shadow-sm border border-gray-100 transition-all duration-300 hover:shadow-md;
|
|
}
|
|
.btn-primary {
|
|
@apply bg-primary hover:bg-primary/90 text-white px-4 py-2 rounded-lg transition-all duration-200 shadow-sm hover:shadow flex items-center justify-center gap-2;
|
|
}
|
|
.btn-outline {
|
|
@apply border border-gray-200 hover:border-primary/50 text-neutral-dark hover:text-primary px-4 py-2 rounded-lg transition-all duration-200 flex items-center justify-center gap-2;
|
|
}
|
|
.fade-in {
|
|
animation: fadeIn 0.3s ease-in-out;
|
|
}
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; transform: translateY(-10px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
.pulse {
|
|
animation: pulse 2s infinite;
|
|
}
|
|
@keyframes pulse {
|
|
0% { transform: scale(1); }
|
|
50% { transform: scale(1.05); }
|
|
100% { transform: scale(1); }
|
|
}
|
|
.scrollbar-thin {
|
|
scrollbar-width: thin;
|
|
}
|
|
.scrollbar-thin::-webkit-scrollbar {
|
|
width: 4px;
|
|
}
|
|
.scrollbar-thin::-webkit-scrollbar-thumb {
|
|
background-color: rgba(156, 163, 175, 0.5);
|
|
border-radius: 4px;
|
|
}
|
|
.sticky-top {
|
|
position: sticky;
|
|
top: 20px;
|
|
z-index: 10;
|
|
}
|
|
.page-container {
|
|
display: none;
|
|
opacity: 0;
|
|
transition: opacity 0.3s ease-in-out;
|
|
min-height: calc(100vh - 2rem);
|
|
width: 100%;
|
|
}
|
|
.page-container.active {
|
|
display: block;
|
|
opacity: 1;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body class="bg-neutral font-inter text-gray-800">
|
|
<!-- 顶部导航栏 - 移动设备 -->
|
|
<header class="lg:hidden fixed top-0 left-0 right-0 bg-white shadow-sm z-10">
|
|
<div class="container mx-auto px-4 py-3 flex justify-between items-center">
|
|
<div class="flex items-center gap-2">
|
|
<i class="fa-solid fa-shield text-primary text-lg"></i>
|
|
<span class="text-lg font-bold text-primary">智能保镖</span>
|
|
</div>
|
|
<button id="mobile-menu-button" class="p-2 rounded-lg hover:bg-gray-100">
|
|
<i class="fa-solid fa-bars"></i>
|
|
</button>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="flex min-h-screen pt-14 lg:pt-0">
|
|
<!-- 侧边栏导航 -->
|
|
<aside id="sidebar" class="lg:w-64 bg-white shadow-sm flex-shrink-0 hidden lg:block transition-all duration-300 z-20">
|
|
<div class="p-4 border-b border-gray-100">
|
|
<div class="flex items-center gap-2">
|
|
<i class="fa-solid fa-shield text-primary text-xl"></i>
|
|
<h1 class="text-lg font-bold text-primary">智能保镖</h1>
|
|
</div>
|
|
<p class="text-xs text-gray-400 mt-1">直播间智能管理助手</p>
|
|
</div>
|
|
|
|
<nav class="p-4">
|
|
<ul class="space-y-1">
|
|
<li><a href="#live-management" class="sidebar-item" data-page="live-management"><i class="fa-solid fa-video"></i> 直播管理</a></li>
|
|
<li><a href="#smart-bodyguard" class="sidebar-item" data-page="smart-bodyguard"><i class="fa-solid fa-cogs"></i> 保镖设置</a></li>
|
|
<li><a href="#id-whitelist-blacklist" class="sidebar-item" data-page="id-whitelist-blacklist"><i class="fa-solid fa-user-check"></i> ID黑白名单</a></li>
|
|
<li><a href="#id-blacklist" class="sidebar-item" data-page="id-blacklist"><i class="fas fa-ban"></i> 拉黑记录</a></li>
|
|
<li><a href="#logging" class="sidebar-item" data-page="logging"><i class="fa-solid fa-file-lines"></i> 运行日志</a></li>
|
|
<li><a href="#tutorial" class="sidebar-item" data-page="tutorial"><i class="fa-solid fa-book"></i> 使用教程</a></li>
|
|
<li><a href="#feedback" class="sidebar-item" data-page="feedback"><i class="fa-solid fa-comment-dots"></i> 意见反馈</a></li>
|
|
</ul>
|
|
</nav>
|
|
</aside>
|
|
|
|
<!-- 主内容区 -->
|
|
<main id="main-content" class="flex-1 overflow-y-auto bg-neutral p-4 lg:p-6">
|
|
<!-- 页面加载提示 -->
|
|
<div id="page-loading" class="fixed top-0 left-0 right-0 bottom-0 bg-white bg-opacity-80 z-50 flex items-center justify-center">
|
|
<div class="text-center">
|
|
<div class="inline-block animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-primary"></div>
|
|
<p class="mt-3 text-primary font-medium">页面加载中...</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 页面容器 -->
|
|
<div id="live-management-page" class="page-container fade-in"></div>
|
|
<div id="smart-bodyguard-page" class="page-container fade-in"></div>
|
|
<div id="id-whitelist-blacklist-page" class="page-container fade-in"></div>
|
|
<div id="id-blacklist-page" class="page-container fade-in"></div>
|
|
<div id="logging-page" class="page-container fade-in"></div>
|
|
<div id="tutorial-page" class="page-container fade-in"></div>
|
|
<div id="feedback-page" class="page-container fade-in"></div>
|
|
</main>
|
|
</div>
|
|
|
|
<!-- 脚本文件 -->
|
|
<script>
|
|
// 全局对象存储pywebview API
|
|
window.pywebviewReady = false;
|
|
|
|
// 当pywebview API准备就绪时调用
|
|
window.addEventListener('pywebviewready', function() {
|
|
console.log('pywebview API 已加载完成');
|
|
window.pywebviewReady = true;
|
|
|
|
// 隐藏加载提示
|
|
setTimeout(function() {
|
|
const pageLoading = document.getElementById('page-loading');
|
|
if (pageLoading) {
|
|
pageLoading.classList.add('opacity-0');
|
|
setTimeout(function() {
|
|
pageLoading.style.display = 'none';
|
|
}, 300);
|
|
}
|
|
|
|
// 初始化账号数据
|
|
if (window.pywebview && window.pywebview.api) {
|
|
window.pywebview.api.get_initial_accounts();
|
|
}
|
|
}, 500);
|
|
});
|
|
</script>
|
|
<script src="./js/app.js"></script>
|
|
</body>
|
|
</html> |