SN日志动作列中文化:admin.php与player.php新增SN_ACTION_CN映射,覆盖issue_admin/cancel_force等全部动作值

This commit is contained in:
ypsdf1
2026-09-30 12:31:17 +08:00
parent a97f9274cc
commit 27da2b5c05
2 changed files with 21 additions and 4 deletions
+10 -2
View File
@@ -4074,6 +4074,14 @@ const SN_LOST_CN = {
auto_reissue: '♻️ 已补发', done: '✅ 已完成'
};
const SN_ACTION_CN = {
issue: '申领', issue_admin: '办理签发', backfill: '存量补登记',
cancel: '注销', cancel_force: '强制注销', reissue: '补发',
destroy: '销毁解绑', report: '报失', pickup_mismatch: '拾取归属不符',
illegal_craft: '非法合成', illegal_burn: '非法熔炼', bind: '永久绑定',
locate: '位置查询'
};
function snActionCn(a) { return SN_ACTION_CN[a] || a; }
function snStatusCn(s) { return SN_STATUS_CN[s] || s; }
function snAdmSearch() {
@@ -4235,11 +4243,11 @@ async function renderSnDetail(el, sn) {
}
html += '<h3 style="margin:18px 0 8px;font-size:14px">📜 操作日志</h3>' + snAdmLogTable(d.logs || [], ['时间', '动作', '玩家', '说明'], r => [
snFmtTs(r.time), r.action, r.player, r.detail
snFmtTs(r.time), snActionCn(r.action), r.player, r.detail
]);
html += '<h3 style="margin:18px 0 8px;font-size:14px">📦 出入库登记</h3>' + snAdmLogTable(d.stock || [], ['时间', '动作', '容器', '坐标', '领地', '玩家'], r => [
snFmtTs(r.time), r.action, r.container_type || '-',
snFmtTs(r.time), snActionCn(r.action), r.container_type || '-',
(r.world || '') + ' ' + r.x + ',' + r.y + ',' + r.z,
r.in_land ? (r.land_name || '是') : '-', r.player || '-'
]);
+11 -2
View File
@@ -4088,6 +4088,15 @@ async function clearAllMemberPerms(landName, targetPlayer) {
renderSn(document.getElementById('content'));
}
const SN_ACTION_CN = {
issue: '申领', issue_admin: '办理签发', backfill: '存量补登记',
cancel: '注销', cancel_force: '强制注销', reissue: '补发',
destroy: '销毁解绑', report: '报失', pickup_mismatch: '拾取归属不符',
illegal_craft: '非法合成', illegal_burn: '非法熔炼', bind: '永久绑定',
locate: '位置查询'
};
function snActionCn(a) { return SN_ACTION_CN[a] || a; }
async function snDoAction(action, sn) {
const box = document.getElementById('snQueryInput');
sn = sn || (box ? box.value.trim() : '');
@@ -4166,7 +4175,7 @@ async function clearAllMemberPerms(landName, targetPlayer) {
for (const l of logs) {
html += '<tr style="border-top:1px solid var(--border)">' +
'<td style="padding:5px;white-space:nowrap;color:var(--dim)">' + escHtml(snFmtTime(l.time)) + '</td>' +
'<td style="padding:5px">' + escHtml(l.action) + '</td>' +
'<td style="padding:5px">' + escHtml(snActionCn(l.action)) + '</td>' +
'<td style="padding:5px">' + escHtml(l.player) + '</td>' +
'<td style="padding:5px;color:var(--dim);word-break:break-all">' + escHtml(l.detail) + '</td></tr>';
}
@@ -4183,7 +4192,7 @@ async function clearAllMemberPerms(landName, targetPlayer) {
const land = st.in_land ? (st.land_name || '是') : '-';
html += '<tr style="border-top:1px solid var(--border)">' +
'<td style="padding:5px;white-space:nowrap;color:var(--dim)">' + escHtml(snFmtTime(st.time)) + '</td>' +
'<td style="padding:5px">' + escHtml(st.action) + '</td>' +
'<td style="padding:5px">' + escHtml(snActionCn(st.action)) + '</td>' +
'<td style="padding:5px">' + escHtml(st.container_type || '-') + '</td>' +
'<td style="padding:5px;font-family:monospace">' + escHtml((st.world || '') + ' ' + st.x + ',' + st.y + ',' + st.z) + '</td>' +
'<td style="padding:5px">' + escHtml(land) + '</td>' +