fix: 操作记录改名访问记录并加宽弹窗;版本发布时间戳改为 UTC+8 展示
build-and-deploy / build-and-deploy (push) Successful in 42s

This commit is contained in:
jif2.zhang
2026-09-21 10:44:05 +08:00
parent 6bc738d359
commit ed1457e582
4 changed files with 51 additions and 18 deletions
+14 -2
View File
@@ -478,8 +478,20 @@ body {
to { transform: translateX(0); }
}
.modal-sm {
width: 360px;
.modal-sm {
width: 360px;
}
/* 宽模态框:访问记录等表格型内容,宽度至少占屏幕的 70% */
.modal-wide {
width: min(86vw, 1720px);
max-width: none;
display: flex;
flex-direction: column;
}
.modal-wide .modal-body {
max-height: 70vh;
}
.modal-header {
+3 -3
View File
@@ -47,7 +47,7 @@
<span class="group-label">数据</span>
<button id="btn-export-config" class="toolbar-btn" title="导出配置">📥 导出</button>
<button id="btn-import-config" class="toolbar-btn" title="导入配置">📤 导入</button>
<button id="btn-audit" class="toolbar-btn" title="查看当前项目操作记录">📜 操作记录</button>
<button id="btn-audit" class="toolbar-btn" title="查看当前项目访问记录">📜 访问记录</button>
<input type="file" id="import-file-input" accept=".json" style="display:none">
</div>
</div>
@@ -305,9 +305,9 @@
</div>
<div class="modal-overlay" id="modal-audit" style="display:none">
<div class="modal" style="max-width:920px">
<div class="modal modal-wide">
<div class="modal-header">
<h3>操作记录 <span id="audit-title" style="font-weight:normal;font-size:12px;color:#999"></span></h3>
<h3>访问记录 <span id="audit-title" style="font-weight:normal;font-size:12px;color:#999"></span></h3>
<button class="modal-close" onclick="closeModal('modal-audit')">✕</button>
</div>
<div class="modal-body">
+5 -5
View File
@@ -672,7 +672,7 @@ async function copyAddress() {
}
/**
* 打开操作记录弹窗
* 打开访问记录弹窗
* @param {string|null} key - 为空时查当前项目全部记录;否则查指定配置键的记录
* @returns {Promise<void>}
*/
@@ -689,19 +689,19 @@ async function openAudit(key) {
const logs = await API.getAudit(state.currentProject.id, key || "");
renderAudit(logs);
} catch (err) {
toast("加载操作记录失败: " + err.message, "error");
toast("加载访问记录失败: " + err.message, "error");
}
}
/**
* 渲染操作记录表格
* @param {Array} logs - 操作记录列表
* 渲染访问记录表格
* @param {Array} logs - 访问记录列表
* @returns {void}
*/
function renderAudit(logs) {
const tbody = document.getElementById("audit-tbody");
if (!logs || !logs.length) {
tbody.innerHTML = '<tr><td colspan="7" style="text-align:center;color:#999;padding:24px">暂无操作记录</td></tr>';
tbody.innerHTML = '<tr><td colspan="7" style="text-align:center;color:#999;padding:24px">暂无访问记录</td></tr>';
return;
}
const ACTION_NAMES = { read: "读取", create: "新增", update: "更新", delete: "删除" };