```
feat(config): style(ui): 全面重构用户界面样式 - 引入新的配色方案和设计系统变量 - 更新字体家族,使用 Fira Sans 和 Noto Sans SC - 重新设计页面布局和组件样式 - 添加响应式设计优化 - 改进按钮、表格、表单等UI元素的视觉效果 feat(tasks): 添加任务级别浏览器配置选项 - 在任务配置中增加独立的浏览器开启/关闭选项 - 支持任务继承全局浏览器设置 - 在任务列表中显示浏览器配置状态 - 实现任务级别的 useBrowser 字段管理 ```
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>抓取结果查看 - 公告采集工具</title>
|
||||
<style>
|
||||
@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400;500;600;700&family=Fira+Code:wght@500;600&family=Noto+Sans+SC:wght@400;500;700&display=swap');
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
@@ -44,7 +46,7 @@
|
||||
.topbar-logo {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
background: linear-gradient(135deg, #667eea, #764ba2);
|
||||
background: linear-gradient(135deg, #0f6ecd, #0ea5a4);
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -79,8 +81,8 @@
|
||||
}
|
||||
|
||||
.topbar-link.active {
|
||||
background: rgba(102, 126, 234, 0.25);
|
||||
color: #8fa8f8;
|
||||
background: rgba(15, 110, 205, 0.25);
|
||||
color: #5ea2e8;
|
||||
}
|
||||
|
||||
/* ===== 主体内容 ===== */
|
||||
@@ -128,7 +130,7 @@
|
||||
|
||||
.stat-card:hover {
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
border-color: rgba(102, 126, 234, 0.4);
|
||||
border-color: rgba(15, 110, 205, 0.4);
|
||||
}
|
||||
|
||||
.stat-card .label {
|
||||
@@ -192,8 +194,8 @@
|
||||
|
||||
.filter-select:focus,
|
||||
.filter-input:focus {
|
||||
border-color: #667eea;
|
||||
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
|
||||
border-color: #0f6ecd;
|
||||
box-shadow: 0 0 0 3px rgba(15, 110, 205, 0.15);
|
||||
}
|
||||
|
||||
.filter-select option {
|
||||
@@ -224,14 +226,14 @@
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: linear-gradient(135deg, #667eea, #764ba2);
|
||||
background: linear-gradient(135deg, #0f6ecd, #0ea5a4);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
opacity: 0.9;
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
|
||||
box-shadow: 0 4px 14px rgba(15, 110, 205, 0.4);
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
@@ -286,7 +288,7 @@
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 4px;
|
||||
background: linear-gradient(180deg, #667eea, #764ba2);
|
||||
background: linear-gradient(180deg, #0f6ecd, #0ea5a4);
|
||||
border-radius: 14px 0 0 14px;
|
||||
}
|
||||
|
||||
@@ -296,7 +298,7 @@
|
||||
|
||||
.result-card:hover {
|
||||
background: rgba(255, 255, 255, 0.07);
|
||||
border-color: rgba(102, 126, 234, 0.3);
|
||||
border-color: rgba(15, 110, 205, 0.3);
|
||||
}
|
||||
|
||||
.result-card-header {
|
||||
@@ -323,9 +325,9 @@
|
||||
}
|
||||
|
||||
.tag-city {
|
||||
background: rgba(102, 126, 234, 0.2);
|
||||
color: #8fa8f8;
|
||||
border: 1px solid rgba(102, 126, 234, 0.3);
|
||||
background: rgba(15, 110, 205, 0.2);
|
||||
color: #5ea2e8;
|
||||
border: 1px solid rgba(15, 110, 205, 0.3);
|
||||
}
|
||||
|
||||
.tag-section {
|
||||
@@ -353,7 +355,7 @@
|
||||
}
|
||||
|
||||
.result-url a {
|
||||
color: #6fa3ff;
|
||||
color: #3c88d6;
|
||||
text-decoration: none;
|
||||
font-size: 13px;
|
||||
word-break: break-all;
|
||||
@@ -437,8 +439,8 @@
|
||||
}
|
||||
|
||||
.data-table th {
|
||||
background: rgba(102, 126, 234, 0.15);
|
||||
color: #8fa8f8;
|
||||
background: rgba(15, 110, 205, 0.15);
|
||||
color: #5ea2e8;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
}
|
||||
@@ -452,7 +454,7 @@
|
||||
}
|
||||
|
||||
.data-table td a {
|
||||
color: #6fa3ff;
|
||||
color: #3c88d6;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
@@ -519,15 +521,15 @@
|
||||
}
|
||||
|
||||
.page-btn:hover:not(:disabled) {
|
||||
background: rgba(102, 126, 234, 0.25);
|
||||
color: #8fa8f8;
|
||||
border-color: rgba(102, 126, 234, 0.4);
|
||||
background: rgba(15, 110, 205, 0.25);
|
||||
color: #5ea2e8;
|
||||
border-color: rgba(15, 110, 205, 0.4);
|
||||
}
|
||||
|
||||
.page-btn.active-page {
|
||||
background: rgba(102, 126, 234, 0.3);
|
||||
color: #8fa8f8;
|
||||
border-color: rgba(102, 126, 234, 0.5);
|
||||
background: rgba(15, 110, 205, 0.3);
|
||||
color: #5ea2e8;
|
||||
border-color: rgba(15, 110, 205, 0.5);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
@@ -580,8 +582,8 @@
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border: 3px solid rgba(102, 126, 234, 0.2);
|
||||
border-top-color: #667eea;
|
||||
border: 3px solid rgba(15, 110, 205, 0.2);
|
||||
border-top-color: #0f6ecd;
|
||||
border-radius: 50%;
|
||||
animation: spin 0.8s linear infinite;
|
||||
margin-bottom: 12px;
|
||||
@@ -790,26 +792,330 @@
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
/* ===== Glass Theme Override (No Purple) ===== */
|
||||
|
||||
:root {
|
||||
--primary: #0f6ecd;
|
||||
--primary-soft: rgba(15, 110, 205, 0.18);
|
||||
--secondary: #0ea5a4;
|
||||
--accent: #f59e0b;
|
||||
--text: #112941;
|
||||
--muted: #536b86;
|
||||
--line: rgba(17, 41, 65, 0.14);
|
||||
--glass: rgba(255, 255, 255, 0.62);
|
||||
--glass-strong: rgba(255, 255, 255, 0.82);
|
||||
--danger: #d94848;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Fira Sans', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
||||
color: var(--text);
|
||||
background:
|
||||
radial-gradient(900px 500px at -5% -5%, rgba(15, 110, 205, 0.20), transparent 55%),
|
||||
radial-gradient(900px 520px at 108% -10%, rgba(14, 165, 164, 0.18), transparent 52%),
|
||||
linear-gradient(145deg, #edf6ff 0%, #e8fbf6 50%, #f6fbff 100%);
|
||||
}
|
||||
|
||||
.topbar {
|
||||
background: var(--glass);
|
||||
border-bottom: 1px solid var(--line);
|
||||
backdrop-filter: blur(14px);
|
||||
-webkit-backdrop-filter: blur(14px);
|
||||
}
|
||||
|
||||
.topbar-logo {
|
||||
background: linear-gradient(125deg, var(--primary), var(--secondary));
|
||||
color: #fff;
|
||||
font-family: 'Fira Code', sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.4px;
|
||||
}
|
||||
|
||||
.topbar-title { color: #1a3f65; }
|
||||
|
||||
.topbar-link {
|
||||
color: var(--muted);
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
.topbar-link:hover {
|
||||
color: var(--text);
|
||||
background: rgba(255, 255, 255, 0.7);
|
||||
border-color: var(--line);
|
||||
}
|
||||
|
||||
.topbar-link.active {
|
||||
color: var(--primary);
|
||||
background: rgba(15, 110, 205, 0.12);
|
||||
border-color: rgba(15, 110, 205, 0.24);
|
||||
}
|
||||
|
||||
.page-header h1 { color: #173d62; }
|
||||
.page-header p { color: var(--muted); }
|
||||
|
||||
.stat-card,
|
||||
.toolbar,
|
||||
.result-card,
|
||||
.dialog-box,
|
||||
.detail-box {
|
||||
background: var(--glass);
|
||||
border-color: var(--line);
|
||||
backdrop-filter: blur(14px);
|
||||
-webkit-backdrop-filter: blur(14px);
|
||||
box-shadow: 0 16px 36px rgba(15, 42, 74, 0.12);
|
||||
}
|
||||
|
||||
.stat-card:hover,
|
||||
.result-card:hover {
|
||||
background: var(--glass-strong);
|
||||
border-color: rgba(15, 110, 205, 0.26);
|
||||
}
|
||||
|
||||
.stat-card .label,
|
||||
.stat-card .sub,
|
||||
.page-info,
|
||||
.result-time,
|
||||
.dialog-msg {
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.stat-card .value,
|
||||
.detail-header h3,
|
||||
.dialog-title,
|
||||
.result-data-body h4,
|
||||
.detail-body h4 {
|
||||
color: #183f65;
|
||||
}
|
||||
|
||||
.filter-group label { color: #304d6b; }
|
||||
|
||||
.filter-select,
|
||||
.filter-input {
|
||||
background: rgba(255, 255, 255, 0.76);
|
||||
border-color: var(--line);
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.filter-select:focus,
|
||||
.filter-input:focus {
|
||||
border-color: rgba(15, 110, 205, 0.5);
|
||||
box-shadow: 0 0 0 3px rgba(15, 110, 205, 0.12);
|
||||
}
|
||||
|
||||
.filter-select option {
|
||||
background: #ffffff;
|
||||
color: #1b3f62;
|
||||
}
|
||||
|
||||
.btn {
|
||||
border: 1px solid transparent;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: linear-gradient(125deg, var(--primary), #178ac2);
|
||||
color: #fff;
|
||||
box-shadow: 0 8px 16px rgba(15, 110, 205, 0.24);
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 12px 24px rgba(15, 110, 205, 0.26);
|
||||
}
|
||||
|
||||
.btn-ghost {
|
||||
color: #284867;
|
||||
background: rgba(255, 255, 255, 0.76);
|
||||
border-color: var(--line);
|
||||
}
|
||||
|
||||
.btn-ghost:hover {
|
||||
color: #163a60;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
color: #b73d3d;
|
||||
background: rgba(217, 72, 72, 0.10);
|
||||
border-color: rgba(217, 72, 72, 0.22);
|
||||
}
|
||||
|
||||
.btn-danger:hover {
|
||||
color: #fff;
|
||||
background: linear-gradient(125deg, #d94848, #e36d61);
|
||||
}
|
||||
|
||||
.result-card::before {
|
||||
background: linear-gradient(180deg, var(--primary), var(--secondary));
|
||||
}
|
||||
|
||||
.result-card.has-error::before {
|
||||
background: linear-gradient(180deg, #d94848, #ed7a62);
|
||||
}
|
||||
|
||||
.tag-city {
|
||||
background: rgba(15, 110, 205, 0.12);
|
||||
color: #0f5fae;
|
||||
border-color: rgba(15, 110, 205, 0.24);
|
||||
}
|
||||
|
||||
.tag-section {
|
||||
background: rgba(14, 165, 164, 0.12);
|
||||
color: #0b7a79;
|
||||
border-color: rgba(14, 165, 164, 0.24);
|
||||
}
|
||||
|
||||
.tag-type {
|
||||
background: rgba(245, 158, 11, 0.16);
|
||||
color: #b96f06;
|
||||
border-color: rgba(245, 158, 11, 0.28);
|
||||
}
|
||||
|
||||
.tag-error {
|
||||
background: rgba(217, 72, 72, 0.14);
|
||||
color: #bf3b3b;
|
||||
border-color: rgba(217, 72, 72, 0.28);
|
||||
}
|
||||
|
||||
.result-url a,
|
||||
.data-table td a {
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.result-data {
|
||||
background: rgba(255, 255, 255, 0.68);
|
||||
border-color: var(--line);
|
||||
}
|
||||
|
||||
.result-data-toggle {
|
||||
color: #375677;
|
||||
}
|
||||
|
||||
.result-data-toggle:hover {
|
||||
color: #1b4168;
|
||||
}
|
||||
|
||||
.result-data-body pre,
|
||||
.detail-body pre {
|
||||
color: #225068;
|
||||
}
|
||||
|
||||
.data-table {
|
||||
color: #1f3f5d;
|
||||
}
|
||||
|
||||
.data-table th,
|
||||
.data-table td {
|
||||
border-color: rgba(17, 41, 65, 0.12);
|
||||
}
|
||||
|
||||
.data-table th {
|
||||
background: rgba(15, 110, 205, 0.12);
|
||||
color: #185a9f;
|
||||
}
|
||||
|
||||
.data-table tr:nth-child(even) {
|
||||
background: rgba(255, 255, 255, 0.42);
|
||||
}
|
||||
|
||||
.data-table tr:hover {
|
||||
background: rgba(255, 255, 255, 0.72);
|
||||
}
|
||||
|
||||
.result-card-footer {
|
||||
border-top-color: rgba(17, 41, 65, 0.10);
|
||||
}
|
||||
|
||||
.page-btn {
|
||||
background: rgba(255, 255, 255, 0.72);
|
||||
border-color: var(--line);
|
||||
color: #2a4b6c;
|
||||
}
|
||||
|
||||
.page-btn:hover:not(:disabled) {
|
||||
background: rgba(15, 110, 205, 0.14);
|
||||
color: var(--primary);
|
||||
border-color: rgba(15, 110, 205, 0.25);
|
||||
}
|
||||
|
||||
.page-btn.active-page {
|
||||
background: rgba(15, 110, 205, 0.2);
|
||||
color: #0f5fae;
|
||||
border-color: rgba(15, 110, 205, 0.35);
|
||||
}
|
||||
|
||||
.empty-state,
|
||||
.empty-state h3,
|
||||
.empty-state p {
|
||||
color: #4a6481;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
border-color: rgba(15, 110, 205, 0.18);
|
||||
border-top-color: var(--primary);
|
||||
}
|
||||
|
||||
.toast {
|
||||
color: #fff;
|
||||
box-shadow: 0 8px 24px rgba(17, 41, 65, 0.24);
|
||||
}
|
||||
|
||||
.overlay,
|
||||
.detail-overlay {
|
||||
background: rgba(8, 20, 36, 0.34);
|
||||
backdrop-filter: blur(4px);
|
||||
-webkit-backdrop-filter: blur(4px);
|
||||
}
|
||||
|
||||
.dialog-title,
|
||||
.detail-header h3 {
|
||||
font-family: 'Fira Code', 'Noto Sans SC', sans-serif;
|
||||
}
|
||||
|
||||
.detail-header {
|
||||
border-bottom-color: rgba(17, 41, 65, 0.10);
|
||||
}
|
||||
|
||||
.close-btn {
|
||||
background: rgba(255, 255, 255, 0.75);
|
||||
color: #345777;
|
||||
border: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.close-btn:hover {
|
||||
background: #ffffff;
|
||||
color: #1b4269;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
* {
|
||||
transition: none !important;
|
||||
animation: none !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- 顶部导航 -->
|
||||
<div class="topbar">
|
||||
<a href="/" class="topbar-brand">
|
||||
<div class="topbar-logo">📋</div>
|
||||
<div class="topbar-logo">AG</div>
|
||||
<span class="topbar-title">公告采集工具</span>
|
||||
</a>
|
||||
<div class="topbar-nav">
|
||||
<a href="/" class="topbar-link">⚙️ 配置管理</a>
|
||||
<a href="/results.html" class="topbar-link active">📊 抓取结果</a>
|
||||
<a href="/" class="topbar-link"> 配置管理</a>
|
||||
<a href="/results.html" class="topbar-link active"> 抓取结果</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main">
|
||||
<!-- 页头 -->
|
||||
<div class="page-header">
|
||||
<h1>📊 抓取结果</h1>
|
||||
<h1> 抓取结果</h1>
|
||||
<p>所有抓取来源的历史结果,按抓取时间倒序展示</p>
|
||||
</div>
|
||||
|
||||
@@ -859,8 +1165,8 @@
|
||||
</div>
|
||||
<div class="toolbar-actions">
|
||||
<button class="btn btn-ghost" onclick="resetFilters()">↺ 重置</button>
|
||||
<button class="btn btn-primary" onclick="loadResults()">🔄 刷新</button>
|
||||
<button class="btn btn-danger" onclick="confirmClearAll()">🗑 清空全部</button>
|
||||
<button class="btn btn-primary" onclick="loadResults()"> 刷新</button>
|
||||
<button class="btn btn-danger" onclick="confirmClearAll()"> 清空全部</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -883,7 +1189,7 @@
|
||||
<!-- 确认清空弹窗 -->
|
||||
<div class="overlay" id="confirmOverlay">
|
||||
<div class="dialog-box">
|
||||
<div class="dialog-title">⚠️ 确认清空</div>
|
||||
<div class="dialog-title"> 确认清空</div>
|
||||
<div class="dialog-msg" id="confirmMsg">确定要清空所有抓取结果吗?此操作不可撤销。</div>
|
||||
<div class="dialog-actions">
|
||||
<button class="btn btn-ghost" onclick="closeConfirm()">取消</button>
|
||||
@@ -993,7 +1299,7 @@
|
||||
renderResults(json.data || []);
|
||||
renderPagination(json.total, json.page, json.pageSize);
|
||||
} catch (e) {
|
||||
listEl.innerHTML = `<div class="empty-state"><div class="icon">⚠️</div><h3>加载失败</h3><p>${e.message}</p></div>`;
|
||||
listEl.innerHTML = `<div class="empty-state"><div class="icon"></div><h3>加载失败</h3><p>${e.message}</p></div>`;
|
||||
} finally {
|
||||
maskEl.classList.remove('show');
|
||||
}
|
||||
@@ -1015,7 +1321,7 @@
|
||||
if (data.length === 0) {
|
||||
listEl.innerHTML = `
|
||||
<div class="empty-state">
|
||||
<div class="icon">🔍</div>
|
||||
<div class="icon"></div>
|
||||
<h3>暂无抓取记录</h3>
|
||||
<p>运行抓取来源后,结果将自动保存在这里</p>
|
||||
</div>`;
|
||||
@@ -1029,13 +1335,13 @@
|
||||
${r.city ? `<span class="tag tag-city">${r.city}</span>` : ''}
|
||||
${r.section ? `<span class="tag tag-section">${r.section}${r.subsection ? ' · ' + r.subsection : ''}</span>` : ''}
|
||||
${r.type ? `<span class="tag tag-type">${r.type}</span>` : ''}
|
||||
${r.error ? `<span class="tag tag-error">❌ 失败</span>` : ''}
|
||||
${r.error ? `<span class="tag tag-error"> 失败</span>` : ''}
|
||||
</div>
|
||||
<span class="result-time">${formatTime(r.scrapedAt)}</span>
|
||||
</div>
|
||||
|
||||
<div class="result-url">
|
||||
<a href="${r.url}" target="_blank" title="${r.url}">🔗 ${r.url}</a>
|
||||
<a href="${r.url}" target="_blank" title="${r.url}"> ${r.url}</a>
|
||||
</div>
|
||||
|
||||
${r.error ? `<div class="result-error">错误信息:${r.error}</div>` : ''}
|
||||
@@ -1043,7 +1349,7 @@
|
||||
${!r.error && r.data ? `
|
||||
<div class="result-data">
|
||||
<button class="result-data-toggle" onclick="toggleData(this)">
|
||||
<span>📄 查看数据</span>
|
||||
<span> 查看数据</span>
|
||||
<span>▼</span>
|
||||
</button>
|
||||
<div class="result-data-body">
|
||||
@@ -1052,7 +1358,7 @@
|
||||
</div>` : ''}
|
||||
|
||||
<div class="result-card-footer">
|
||||
${!r.error && r.data ? `<button class="btn btn-ghost btn-sm" onclick="openDetail('${r.id}')">🔎 全屏查看</button>` : ''}
|
||||
${!r.error && r.data ? `<button class="btn btn-ghost btn-sm" onclick="openDetail('${r.id}')"> 全屏查看</button>` : ''}
|
||||
<button class="btn btn-danger btn-sm" onclick="deleteResult('${r.id}')">删除</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1245,7 +1551,7 @@
|
||||
else val = String(val);
|
||||
|
||||
if ((val.startsWith('http://') || val.startsWith('https://')) && !val.includes(' ')) {
|
||||
html += `<td><a href="${escHtml(val)}" target="_blank" title="${escHtml(val)}">🔗 链接</a></td>`;
|
||||
html += `<td><a href="${escHtml(val)}" target="_blank" title="${escHtml(val)}"> 链接</a></td>`;
|
||||
} else {
|
||||
html += `<td>${escHtml(val)}</td>`;
|
||||
}
|
||||
@@ -1270,4 +1576,4 @@
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user