feat: 新增银行卡检查插件及相关依赖与配置文件
This commit is contained in:
@@ -5,7 +5,10 @@
|
||||
<template #title>
|
||||
<span class="p-name">{{ plugin.name }}<span class="ver-tag">v{{ plugin.version }}</span></span>
|
||||
</template>
|
||||
<template #sub>{{ plugin.description || '暂无描述' }}</template>
|
||||
<!-- 副标题:剥掉「XQxxxx 名称:」前缀,最多两行;悬停看全文,完整描述走「详情」弹窗 -->
|
||||
<template #sub>
|
||||
<span class="p-sub" :title="fullDesc">{{ shortDesc }}</span>
|
||||
</template>
|
||||
<template #actions>
|
||||
<span v-if="plugin.platform" class="badge" :class="platformOnline ? 'on' : 'off'">
|
||||
<i class="bdot"></i>{{ platformLabel }} {{ platformOnline ? '已登录' : '未登录' }}
|
||||
@@ -17,9 +20,11 @@
|
||||
<button v-if="rollbackVer" class="btn rollback-btn" :disabled="store.running" @click="doRollback">
|
||||
回滚 v{{ rollbackVer }}
|
||||
</button>
|
||||
<button v-if="hasDesc" class="btn desc-btn" @click="descDialog = true">详情</button>
|
||||
</template>
|
||||
</PageHead>
|
||||
|
||||
<div class="page-body">
|
||||
<!-- 结果横幅 -->
|
||||
<section v-if="store.lastResult" class="banner"
|
||||
:class="store.lastResult.ok ? 'ok' : (store.lastResult.cancelled ? 'mid' : 'err')">
|
||||
@@ -31,9 +36,56 @@
|
||||
<button class="b-close" @click="closeBanner" title="关闭">✕</button>
|
||||
</section>
|
||||
|
||||
<!-- 运行备注:账号 × 插件 唯一,本机保存并回传中心机;执行时随本次运行记录上报
|
||||
备注可能较长(多行),列表只放一行摘要,查看/编辑统一走弹窗 -->
|
||||
<div class="note-bar">
|
||||
<span class="nb-label">运行备注</span>
|
||||
<span class="nb-preview" :class="{ empty: !noteText }" :title="noteText || ''">
|
||||
{{ noteText || ('给 ' + (plugin.name || '当前场景') + ' 写点备注') }}
|
||||
</span>
|
||||
<el-button size="small" text :disabled="!noteText" @click="openNote('view')">查看</el-button>
|
||||
<el-button size="small" text @click="openNote('edit')">编辑</el-button>
|
||||
<span class="nb-state" :class="{ ok: noteSavedAt && !noteSaving }">
|
||||
{{ noteSaving ? '保存中…' : (noteSavedAt ? '已保存 ' + noteSavedAt : '') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- 备注弹窗:查看只读,编辑可改(保存即回传中心机,执行时随运行一起上报) -->
|
||||
<el-dialog v-model="noteDialog" :title="'运行备注 · ' + (plugin.name || '当前场景')"
|
||||
width="560px" append-to-body class="note-dialog">
|
||||
<el-input v-if="noteEdit" v-model="noteDraft" type="textarea" :rows="8" maxlength="500"
|
||||
show-word-limit resize="vertical"
|
||||
:placeholder="'给 ' + (plugin.name || '当前场景') + ' 写点备注'" />
|
||||
<div v-else class="note-view">{{ noteText || '暂无备注' }}</div>
|
||||
<template #footer>
|
||||
<div class="note-foot">
|
||||
<el-button v-if="noteEdit && noteText" text type="danger" :disabled="noteSaving"
|
||||
@click="clearNote">清空</el-button>
|
||||
<span class="spacer" />
|
||||
<el-button @click="noteDialog = false">{{ noteEdit ? '取消' : '关闭' }}</el-button>
|
||||
<el-button v-if="noteEdit" type="primary" :loading="noteSaving" @click="saveNote">保存</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 场景描述详情:manifest 里的完整描述按「;」拆段展示,页头只给两行摘要 -->
|
||||
<el-dialog v-model="descDialog" :title="'场景说明 · ' + (plugin.name || '当前场景')"
|
||||
width="600px" append-to-body class="desc-dialog">
|
||||
<div class="desc-body">
|
||||
<p v-for="(row, i) in descRows" :key="i" class="desc-p">{{ row }}</p>
|
||||
<p v-if="!descRows.length" class="desc-p desc-empty">该场景暂无说明</p>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="note-foot">
|
||||
<span class="spacer" />
|
||||
<el-button @click="descDialog = false">关闭</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 运行台:插件界面 / 运行日志 / 历史运行
|
||||
执行与参数配置收口在插件界面内(插件自包含前端+执行);日志归属"本次运行" -->
|
||||
<div class="run-tabs card">
|
||||
<div class="run-tabs">
|
||||
<div class="rt-head">
|
||||
<div class="rt-tabs">
|
||||
<button v-for="t in tabs" :key="t.k" class="rt-tab" :class="{ on: tab === t.k }" @click="tab = t.k">
|
||||
@@ -61,35 +113,38 @@
|
||||
<div v-if="!replay" class="hist-view">
|
||||
<div class="hist-head">
|
||||
<div class="hist-titles">
|
||||
<span class="sec-eyebrow">HISTORY</span>
|
||||
<span class="hist-title">本场景最近运行</span>
|
||||
<span class="hist-sub">共 {{ runs.length }} 条 · 成功 {{ histOk }} · 失败 {{ histFail }}</span>
|
||||
</div>
|
||||
<el-button size="small" text :icon="Refresh" :loading="loadingRuns" @click="loadRuns">刷新</el-button>
|
||||
</div>
|
||||
<div v-if="!runs.length" class="hist-empty">
|
||||
{{ loadingRuns ? '加载中…' : '该场景还没有运行记录,执行一次后这里可回看' }}
|
||||
<b>{{ loadingRuns ? '正在加载运行记录…' : '还没有运行记录' }}</b>
|
||||
<span>执行一次后,这里可以回看当时的结果与日志</span>
|
||||
</div>
|
||||
<ul v-else class="hist-list">
|
||||
<li v-for="r in runs" :key="r.run_id" class="hist-item" @click="openReplay(r.run_id)">
|
||||
<i class="hist-dot" :class="runState(r).cls"></i>
|
||||
<div class="hist-meta">
|
||||
<b>{{ triggerLabel(r.trigger) }}</b>
|
||||
<span class="hist-time">{{ fmtTime(r.started) }} · {{ durText(r.duration_sec) }}</span>
|
||||
</div>
|
||||
<span class="hist-state" :class="runState(r).cls">{{ runState(r).text }}</span>
|
||||
<el-icon class="hist-arrow"><ArrowRight /></el-icon>
|
||||
<li v-for="r in runs" :key="r.run_id" class="hist-row" @click="openReplay(r.run_id)">
|
||||
<i class="h-dot" :class="runState(r).cls"></i>
|
||||
<span class="h-trig">{{ triggerLabel(r.trigger) }}</span>
|
||||
<span class="h-time">{{ fmtTime(r.started) }}</span>
|
||||
<span class="h-dur">{{ durText(r.duration_sec) }}</span>
|
||||
<span class="h-sum" :title="runSummary(r)">{{ runSummary(r) }}</span>
|
||||
<span class="tag-badge" :class="badgeCls(r)"><i></i>{{ runState(r).text }}</span>
|
||||
<el-icon class="h-arrow"><ArrowRight /></el-icon>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- 回看单次运行(结论 + 该次日志) -->
|
||||
<div v-else class="hist-replay">
|
||||
<div class="replay-head">
|
||||
<el-button size="small" text :icon="ArrowLeft" :disabled="replayBusy" @click="replay = null">返回列表</el-button>
|
||||
<div class="replay-tags">
|
||||
<span class="badge" :class="replay.ok ? 'on' : 'off'"><i class="bdot"></i>{{ replay.ok ? '成功' : '失败' }}</span>
|
||||
<span class="tag-badge" :class="badgeCls(replay)"><i></i>{{ runState(replay).text }}</span>
|
||||
<span class="replay-tag">{{ triggerLabel(replay.trigger) }}</span>
|
||||
<span class="replay-tag">{{ fmtTime(replay.started) }}</span>
|
||||
<span class="replay-tag">耗时 {{ durText(replay.duration_sec) }}</span>
|
||||
<span v-if="replay.note" class="replay-tag">备注:{{ replay.note }}</span>
|
||||
<span v-if="replay.summary" class="replay-sum">{{ replay.summary }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -98,6 +153,7 @@
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else-if="!store.plugins.length" class="empty-note">
|
||||
@@ -111,14 +167,27 @@ import { computed, ref, watch } from 'vue'
|
||||
import { Refresh, ArrowLeft, ArrowRight } from '@element-plus/icons-vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { store } from '../store'
|
||||
import { getRun, fetchRuns, fetchMeta, listRollbacks, rollbackPlugin, fetchQueue } from '../api'
|
||||
import { getRun, fetchRuns, fetchMeta, listRollbacks, rollbackPlugin, fetchQueue,
|
||||
fetchPluginNotes, savePluginNote } from '../api'
|
||||
import LogPanel from './LogPanel.vue'
|
||||
import RunIndicator from './RunIndicator.vue'
|
||||
import PageHead from './PageHead.vue'
|
||||
import { durText, fmtTime } from '../utils/format'
|
||||
import { durText, fmtTime, cleanDesc, splitDesc } from '../utils/format'
|
||||
|
||||
const plugin = computed(() => store.plugins.find((p) => p.id === store.selectedId) || null)
|
||||
|
||||
// ===== 场景描述(页头副标题 + 「详情」弹窗)=====
|
||||
// manifest 的 description 常写成「XQ0034 续签电子签:干这个;再干那个」,页头标题已显示场景名,
|
||||
// 前缀重复且正文偏长:页头只留剥掉前缀后的摘要(CSS 限两行,悬停给全文),完整内容进「详情」弹窗按句分段。
|
||||
const descDialog = ref(false)
|
||||
const fullDesc = computed(() => cleanDesc(plugin.value?.description) || '暂无描述')
|
||||
const hasDesc = computed(() => !!cleanDesc(plugin.value?.description))
|
||||
const shortDesc = computed(() => {
|
||||
const s = cleanDesc(plugin.value?.description)
|
||||
return s || '暂无描述'
|
||||
})
|
||||
const descRows = computed(() => splitDesc(plugin.value?.description))
|
||||
|
||||
// 运行结论三态:成功 / 已取消(用户取消、排队超时、退出取消)/ 失败 / 已中断(客户端退出遗留)
|
||||
// 「取消」不能显示成「失败」——两者对用户的含义完全不同,也不该混进失败统计。
|
||||
function runState(r) {
|
||||
@@ -129,6 +198,26 @@ function runState(r) {
|
||||
return { text: '失败', cls: 'err' }
|
||||
}
|
||||
|
||||
// 历史列表:状态胶囊配色(成功绿 / 失败红 / 取消中断灰)
|
||||
function badgeCls(r) {
|
||||
if (!r) return 'idle'
|
||||
if (r.ok) return 'ok'
|
||||
if (r.status === 'cancelled' || r.status === 'interrupted') return 'idle'
|
||||
return 'bad'
|
||||
}
|
||||
|
||||
// 历史行摘要:优先后端 summary,其次失败原因,都没有给个占位(整行加 title 看全文)
|
||||
function runSummary(r) {
|
||||
if (!r) return '—'
|
||||
const s = String(r.summary || '').trim()
|
||||
if (s) return s
|
||||
const e = String(r.error || '').trim()
|
||||
if (e) return e
|
||||
if (r.status === 'cancelled') return '已取消'
|
||||
if (r.status === 'interrupted') return '已中断'
|
||||
return r.ok ? '执行完成' : '无输出'
|
||||
}
|
||||
|
||||
// 本场景在队列里等待的任务数:连续点了几次「一键执行」时,页头直接给出排队提示
|
||||
const queuedCount = computed(() => {
|
||||
const pid = plugin.value?.id
|
||||
@@ -145,6 +234,91 @@ const uiSrc = computed(() => (plugin.value?.ui ? `/pui/${plugin.value.id}/` : ''
|
||||
// 取消则返回 409,插件自身横幅会显示"启动执行失败:已取消加入队列…",不会误以为已经在跑。
|
||||
const uiFrame = ref(null)
|
||||
|
||||
// ===== 运行备注(账号 × 插件 唯一;本机保存 + 回传中心机,执行时随本次运行一起上报)=====
|
||||
// 备注是壳子层统一能力:17 个插件不用各自实现,新增插件自动具备。
|
||||
const noteText = ref('')
|
||||
const noteSavedAt = ref('')
|
||||
const noteSaving = ref(false)
|
||||
const noteMap = ref({}) // 本机全部备注 { plugin_id: {note, at} }
|
||||
const noteDialog = ref(false)
|
||||
const noteEdit = ref(false)
|
||||
const noteDraft = ref('')
|
||||
let notesLoaded = false
|
||||
|
||||
function syncNoteFromMap() {
|
||||
const cur = plugin.value
|
||||
if (!cur) { noteText.value = ''; noteSavedAt.value = ''; return }
|
||||
const row = noteMap.value[cur.id]
|
||||
noteText.value = (row && row.note) || ''
|
||||
noteSavedAt.value = row && row.at
|
||||
? new Date(row.at * 1000).toLocaleTimeString('zh-CN', { hour12: false })
|
||||
: ''
|
||||
}
|
||||
|
||||
async function loadNotes() {
|
||||
try {
|
||||
const r = await fetchPluginNotes()
|
||||
noteMap.value = (r && r.notes) || {}
|
||||
} catch (_) { /* 备注是辅助能力:拉取失败静默,仍可用本机缓存 */ }
|
||||
syncNoteFromMap()
|
||||
}
|
||||
|
||||
// 查看 / 编辑:备注可能多行长文本,统一在弹窗里看和改
|
||||
function openNote(mode) {
|
||||
if (!plugin.value) return
|
||||
noteEdit.value = mode === 'edit'
|
||||
noteDraft.value = noteText.value
|
||||
noteDialog.value = true
|
||||
}
|
||||
|
||||
async function saveNote() {
|
||||
const cur = plugin.value
|
||||
if (!cur) return
|
||||
noteSaving.value = true
|
||||
try {
|
||||
const r = await savePluginNote(cur.id, noteDraft.value)
|
||||
const note = (r && r.note) || ''
|
||||
noteText.value = note
|
||||
noteDraft.value = note
|
||||
const m = { ...noteMap.value }
|
||||
if (note) m[cur.id] = { note, at: Math.floor(Date.now() / 1000) }
|
||||
else delete m[cur.id]
|
||||
noteMap.value = m
|
||||
noteSavedAt.value = note ? new Date().toLocaleTimeString('zh-CN', { hour12: false }) : ''
|
||||
noteDialog.value = false
|
||||
ElMessage.success(note ? '备注已保存' : '备注已清空')
|
||||
} catch (e) {
|
||||
ElMessage.warning('备注保存失败:' + (e.message || e))
|
||||
} finally {
|
||||
noteSaving.value = false
|
||||
}
|
||||
}
|
||||
|
||||
function clearNote() {
|
||||
noteDraft.value = ''
|
||||
saveNote()
|
||||
}
|
||||
|
||||
watch(() => plugin.value?.id, (id) => {
|
||||
syncNoteFromMap()
|
||||
if (id && !notesLoaded) { notesLoaded = true; loadNotes() }
|
||||
}, { immediate: true })
|
||||
|
||||
// 把备注注入插件提交的 /api/runs(插件本身无需感知备注的存在)
|
||||
function withRunNote(init) {
|
||||
const note = String(noteText.value || '').trim()
|
||||
if (!note) return init
|
||||
const opt = { ...(init || {}) }
|
||||
try {
|
||||
const body = typeof opt.body === 'string' ? JSON.parse(opt.body) : null
|
||||
if (body && typeof body === 'object') {
|
||||
body.note = note
|
||||
opt.body = JSON.stringify(body)
|
||||
}
|
||||
} catch (_) { /* body 非 JSON:原样提交,不影响执行 */ }
|
||||
return opt
|
||||
}
|
||||
|
||||
async function queueSnapshotNow() {
|
||||
try {
|
||||
const snap = await fetchQueue()
|
||||
@@ -215,7 +389,8 @@ function onUiLoad() {
|
||||
if (String(method).toUpperCase() !== 'POST' || !/\/api\/runs\/?$/.test(url)) {
|
||||
return origFetch(input, init)
|
||||
}
|
||||
if (await confirmEnqueue()) return origFetch(input, init)
|
||||
// 放行前把壳子的「运行备注」注入请求体:备注统一由壳子采集,插件无需感知
|
||||
if (await confirmEnqueue()) return origFetch(input, withRunNote(init))
|
||||
const R = w.Response || Response
|
||||
return new R(JSON.stringify({ detail: '已取消加入队列(当前有其他任务在执行)' }), {
|
||||
status: 409,
|
||||
@@ -248,6 +423,9 @@ const loadingRuns = ref(false)
|
||||
const runsLoaded = ref(false) // 本场景是否已拉过(切换场景后重置)
|
||||
const replay = ref(null) // 正在回看的单次运行 {brief..., logs:[...]}
|
||||
const replayBusy = ref(false)
|
||||
// 历史列表顶部统计(成功 / 失败;取消与中断不计入失败)
|
||||
const histOk = computed(() => runs.value.filter((r) => r.ok).length)
|
||||
const histFail = computed(() => runs.value.filter((r) => badgeCls(r) === 'bad').length)
|
||||
|
||||
async function loadRuns() {
|
||||
if (!plugin.value || loadingRuns.value) return
|
||||
@@ -370,11 +548,19 @@ function closeBanner() {
|
||||
.plugin-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-3);
|
||||
padding: var(--page-pad);
|
||||
gap: 0;
|
||||
padding: 0;
|
||||
flex: 1 1 auto; /* 填满中栏上下文区,运行台内部自己滚 */
|
||||
min-height: 0;
|
||||
}
|
||||
/* 页头固定,下面这层才滚动。
|
||||
左右内边距与页头一致(24px),tab 栏 / 内容都贴同一条基线,看起来是一整块 */
|
||||
.page-body {
|
||||
flex: 1 1 auto; min-height: 0;
|
||||
display: flex; flex-direction: column; gap: 0;
|
||||
padding: 0 24px 18px;
|
||||
}
|
||||
.banner { margin: 14px 0 12px; }
|
||||
|
||||
/* ---------- 页头内的场景身份 ---------- */
|
||||
.p-name { display: inline-flex; align-items: center; gap: var(--space-2); }
|
||||
@@ -393,6 +579,19 @@ function closeBanner() {
|
||||
.bdot { width: 6px; height: 6px; border-radius: 50%; background: var(--t5); }
|
||||
.badge.on .bdot { background: var(--good); }
|
||||
.rollback-btn { height: 28px; padding: 0 var(--space-3); font-size: 11.5px; }
|
||||
/* 场景说明:页头摘要(限两行,悬停看全文)+「详情」入口(全文按「;」拆段) */
|
||||
.p-sub { display: block; }
|
||||
.desc-btn { height: 28px; padding: 0 var(--space-3); font-size: 11.5px; color: var(--t3); }
|
||||
.desc-btn:hover { color: var(--t1); }
|
||||
.desc-body { max-height: 52vh; overflow-y: auto; }
|
||||
.desc-p {
|
||||
margin: 0 0 10px; padding-left: 10px;
|
||||
border-left: 2px solid var(--line);
|
||||
font: 400 12.5px/1.7 var(--f-cn); color: var(--t2);
|
||||
word-break: break-word;
|
||||
}
|
||||
.desc-p:last-child { margin-bottom: 0; }
|
||||
.desc-empty { color: var(--t3); border-left-color: var(--line); }
|
||||
/* 本场景排队中:与运行中的进度胶囊并列,点击去看右侧队列明细 */
|
||||
.qchip {
|
||||
display: inline-flex; align-items: center; height: 20px; padding: 0 var(--space-2);
|
||||
@@ -426,20 +625,59 @@ function closeBanner() {
|
||||
}
|
||||
.b-close:hover { color: var(--t1); background: var(--field); }
|
||||
|
||||
/* ---------- 运行台(标签页容器) ---------- */
|
||||
/* ---------- 运行备注(账号 × 插件 唯一,随运行回传中心机) ---------- */
|
||||
.note-bar {
|
||||
display: flex; align-items: center; gap: var(--space-2-5);
|
||||
margin: 14px 0 2px; flex-shrink: 0;
|
||||
}
|
||||
.nb-label {
|
||||
flex: 0 0 auto; font: 600 11.5px/1 var(--f-cn); color: var(--t3);
|
||||
letter-spacing: .5px;
|
||||
}
|
||||
.nb-preview {
|
||||
flex: 1 1 auto; min-width: 0;
|
||||
height: 30px; display: flex; align-items: center;
|
||||
padding: 0 10px;
|
||||
background: var(--field); border: 1px solid var(--line);
|
||||
border-radius: var(--r-field);
|
||||
font: 400 12px/1.5 var(--f-cn); color: var(--t2);
|
||||
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
||||
}
|
||||
.nb-preview.empty { color: var(--t4); }
|
||||
.nb-state {
|
||||
flex: 0 0 auto; min-width: 74px; text-align: right;
|
||||
font: 500 11px/1 var(--f-num); color: var(--t4);
|
||||
}
|
||||
.nb-state.ok { color: var(--good-ink); }
|
||||
|
||||
/* 备注弹窗:查看态用可滚动的等宽留白块,编辑态用 textarea */
|
||||
.note-view {
|
||||
min-height: 130px; max-height: 320px; overflow: auto;
|
||||
padding: 10px 12px;
|
||||
background: var(--field); border: 1px solid var(--line);
|
||||
border-radius: var(--r-field);
|
||||
font: 400 12.5px/1.75 var(--f-cn); color: var(--t2);
|
||||
white-space: pre-wrap; word-break: break-word;
|
||||
}
|
||||
.note-foot { display: flex; align-items: center; gap: var(--space-2); }
|
||||
.note-foot .spacer { flex: 1; }
|
||||
|
||||
/* ---------- 运行台:不套框,tab 栏直接贴在中栏里(只留一条细分隔线) ---------- */
|
||||
.run-tabs {
|
||||
flex: 1 1 auto; min-height: 300px;
|
||||
display: flex; flex-direction: column; overflow: hidden;
|
||||
background: transparent;
|
||||
}
|
||||
.rt-head {
|
||||
display: flex; align-items: center; justify-content: space-between; gap: var(--space-2-5);
|
||||
padding: 0 var(--space-3); border-bottom: 1px solid var(--line-soft); flex-shrink: 0;
|
||||
padding: 0; flex-shrink: 0;
|
||||
border-bottom: 1px solid var(--line-soft);
|
||||
}
|
||||
.rt-tabs { display: flex; align-items: center; gap: 2px; }
|
||||
.rt-tabs { display: flex; align-items: center; gap: 20px; }
|
||||
.rt-tab {
|
||||
display: inline-flex; align-items: center; gap: var(--space-1-5);
|
||||
border: none; background: transparent; cursor: pointer; font-family: inherit;
|
||||
padding: var(--space-3) var(--space-3); font: 500 12.5px/18px var(--f-cn); color: var(--t3);
|
||||
padding: 12px 0; font: 500 12.5px/18px var(--f-cn); color: var(--t3);
|
||||
border-bottom: 2px solid transparent; margin-bottom: -1px;
|
||||
transition: color var(--dur), border-color var(--dur);
|
||||
}
|
||||
@@ -452,52 +690,75 @@ function closeBanner() {
|
||||
.rt-tab.on .rt-n { color: var(--brand-ink); background: var(--brand-soft); }
|
||||
|
||||
.rt-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
|
||||
.rt-log { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
|
||||
.rt-log { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding-top: 14px; }
|
||||
|
||||
/* ---------- 专属界面插件 ---------- */
|
||||
.ui-pane { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; padding: var(--space-3) var(--space-4) var(--space-4); }
|
||||
/* ---------- 专属界面插件:不再给 iframe 描边(插件界面自己带边界会显得"框套框") ---------- */
|
||||
.ui-pane { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; padding: 14px 0 0; }
|
||||
.pui-frame {
|
||||
display: block; width: 100%; flex: 1 1 auto; min-height: 340px;
|
||||
border: 1px solid var(--line); border-radius: var(--r-sub); background: var(--surface);
|
||||
border: 0; border-radius: 0; background: var(--surface);
|
||||
}
|
||||
|
||||
/* ---------- 历史运行 ---------- */
|
||||
.history { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
|
||||
.hist-view { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
|
||||
.hist-head {
|
||||
display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-2-5);
|
||||
padding: var(--space-2-5) var(--space-4) var(--space-1-5); flex-shrink: 0;
|
||||
display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
|
||||
padding: 14px 0 10px; flex-shrink: 0;
|
||||
border-bottom: 1px solid var(--line-soft);
|
||||
}
|
||||
.hist-titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
|
||||
.hist-title { font: 600 12px/17px var(--f-cn); color: var(--t2); }
|
||||
.hist-title { font: 600 13px/18px var(--f-cn); color: var(--t1); }
|
||||
.hist-sub { font: 400 11.5px/16px var(--f-cn); color: var(--t4); }
|
||||
.hist-empty {
|
||||
flex: 1 1 auto; display: grid; place-items: center;
|
||||
color: var(--t4); font-size: 12px; padding: var(--space-6) var(--space-5); text-align: center;
|
||||
flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
|
||||
padding: var(--space-6) var(--space-5); text-align: center;
|
||||
color: var(--t4); font: 400 12px/18px var(--f-cn);
|
||||
}
|
||||
.hist-list { flex: 1 1 auto; min-height: 0; overflow: auto; list-style: none; margin: var(--space-1) var(--space-2) var(--space-2-5); padding: 0; }
|
||||
.hist-item {
|
||||
display: flex; align-items: center; gap: var(--space-3);
|
||||
padding: var(--space-2) var(--space-3); border-radius: var(--r-row); cursor: pointer;
|
||||
.hist-empty b { color: var(--t2); font: 600 13px/19px var(--f-cn); }
|
||||
.hist-list { flex: 1 1 auto; min-height: 0; overflow: auto; list-style: none; margin: 0; padding: 6px 0 8px; }
|
||||
|
||||
/* 行:状态点 / 触发源 / 开始时间 / 耗时 / 摘要(占满剩余宽度)/ 状态胶囊 / 箭头 */
|
||||
.hist-row {
|
||||
display: grid;
|
||||
grid-template-columns: 8px 92px 150px 74px minmax(0, 1fr) 88px 14px;
|
||||
align-items: center; gap: var(--space-3);
|
||||
padding: 9px 12px; border-radius: var(--r-row); cursor: pointer;
|
||||
transition: background var(--dur);
|
||||
}
|
||||
.hist-item:hover { background: var(--field); }
|
||||
.hist-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
|
||||
.hist-dot.ok { background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
|
||||
.hist-dot.err { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
|
||||
.hist-dot.mid { background: var(--t4); box-shadow: 0 0 0 3px var(--field); }
|
||||
.hist-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
|
||||
.hist-meta b { font: 600 12.5px/18px var(--f-cn); color: var(--t1); }
|
||||
.hist-time { font: 400 10.5px/15px var(--f-num); color: var(--t4); }
|
||||
.hist-state { font: 600 11.5px/16px var(--f-cn); flex-shrink: 0; }
|
||||
.hist-state.ok { color: var(--good-ink); }
|
||||
.hist-state.err { color: var(--danger-ink); }
|
||||
.hist-state.mid { color: var(--t4); }
|
||||
.hist-arrow { color: var(--t5); font-size: 13px; flex-shrink: 0; }
|
||||
.hist-row:hover { background: var(--field); }
|
||||
.h-dot { width: 8px; height: 8px; border-radius: 50%; }
|
||||
.h-dot.ok { background: var(--good); }
|
||||
.h-dot.err { background: var(--danger); }
|
||||
.h-dot.mid { background: var(--t4); }
|
||||
.h-trig { font: 500 12px/16px var(--f-cn); color: var(--t2); white-space: nowrap; }
|
||||
.h-time { font: 400 11.5px/16px var(--f-num); color: var(--t3); font-variant-numeric: tabular-nums; }
|
||||
.h-dur { font: 400 11.5px/16px var(--f-num); color: var(--t4); font-variant-numeric: tabular-nums; }
|
||||
.h-sum {
|
||||
min-width: 0; font: 400 11.5px/16px var(--f-cn); color: var(--t4);
|
||||
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
||||
}
|
||||
.h-arrow { color: var(--t5); font-size: 12px; }
|
||||
|
||||
/* 状态胶囊(与壳子表格状态列同款) */
|
||||
.tag-badge {
|
||||
display: inline-flex; align-items: center; gap: 5px;
|
||||
height: 22px; padding: 0 9px;
|
||||
border: 1px solid transparent; border-radius: 6px;
|
||||
font: 500 11px/1 var(--f-cn); white-space: nowrap;
|
||||
}
|
||||
.tag-badge i { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
|
||||
.tag-badge.ok { color: var(--good-ink); background: var(--good-soft); border-color: var(--good-line); }
|
||||
.tag-badge.ok i { background: var(--good); }
|
||||
.tag-badge.bad { color: var(--danger-ink); background: var(--danger-soft); border-color: var(--danger-line); }
|
||||
.tag-badge.bad i { background: var(--danger); }
|
||||
.tag-badge.idle { color: var(--t3); background: var(--field); border-color: var(--line); }
|
||||
.tag-badge.idle i { background: var(--t5); }
|
||||
|
||||
.hist-replay { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
|
||||
.replay-head {
|
||||
display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap;
|
||||
padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--line-soft); flex-shrink: 0;
|
||||
padding: 12px 0 10px; border-bottom: 1px solid var(--line-soft); flex-shrink: 0;
|
||||
}
|
||||
.replay-tags { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; min-width: 0; }
|
||||
.replay-tag {
|
||||
|
||||
Reference in New Issue
Block a user