fix: keychain view
This commit is contained in:
@@ -716,6 +716,30 @@ layui.use(['table', 'form', 'laypage', 'layer'], function () {
|
||||
});
|
||||
return;
|
||||
}
|
||||
// Plaintext detail viewer (sensitive fields masked)
|
||||
if (obj.event === 'plaintext' && obj.data.detail_api_url) {
|
||||
layer.load(1);
|
||||
$.getJSON(obj.data.detail_api_url, function (res) {
|
||||
layer.closeAll('loading');
|
||||
if (!res || res.code !== 0) {
|
||||
return layer.msg((res && res.msg) || '加载失败');
|
||||
}
|
||||
var d = res.data || {};
|
||||
var detail = d.detail || {};
|
||||
var html = '<div style="padding:12px 16px 16px;"><div style="color:#666;font-size:13px;margin-bottom:8px;">#' +
|
||||
esc(d.id) + ' · 来源 ' + esc(d.source || '未知') + ' · ' + esc(d.kind || '') +
|
||||
' · 已解密 ' + (Number(d.decrypted) === 1 ? '是' : '否') + '</div>' +
|
||||
'<div style="color:#999;font-size:12px;margin-bottom:8px;padding:6px 10px;background:#fffbe6;border:1px solid #ffe58f;border-radius:3px;">' +
|
||||
'敏感加密字段已打码,其余明文信息完整展示</div>' +
|
||||
'<pre style="background:#f7f7f7;border:1px solid #e6e6e6;border-radius:3px;padding:12px;font-family:Menlo,Monaco,Consolas,monospace;font-size:12px;line-height:1.5;max-height:560px;overflow:auto;white-space:pre-wrap;word-break:break-all;">' +
|
||||
esc(JSON.stringify(detail, null, 2)) + '</pre></div>';
|
||||
layer.open({ type: 1, title: '明文详情 #' + (d.id || ''), area: ['960px', '80%'], content: html });
|
||||
}).fail(function () {
|
||||
layer.closeAll('loading');
|
||||
layer.msg('加载失败');
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (obj.event !== 'items' || !obj.data.items_url) return;
|
||||
layer.load(1);
|
||||
$.getJSON(obj.data.items_url, function (res) {
|
||||
@@ -751,31 +775,6 @@ layui.use(['table', 'form', 'laypage', 'layer'], function () {
|
||||
layer.msg('加载失败');
|
||||
});
|
||||
});
|
||||
|
||||
// Plaintext detail viewer (sensitive fields masked)
|
||||
table.on('tool(LAY-device-tab-list)', function (obj) {
|
||||
if (obj.event !== 'plaintext' || !obj.data.detail_api_url) return;
|
||||
layer.load(1);
|
||||
$.getJSON(obj.data.detail_api_url, function (res) {
|
||||
layer.closeAll('loading');
|
||||
if (!res || res.code !== 0) {
|
||||
return layer.msg((res && res.msg) || '加载失败');
|
||||
}
|
||||
var d = res.data || {};
|
||||
var detail = d.detail || {};
|
||||
var html = '<div style="padding:12px 16px 16px;"><div style="color:#666;font-size:13px;margin-bottom:8px;">#' +
|
||||
esc(d.id) + ' · 来源 ' + esc(d.source || '未知') + ' · ' + esc(d.kind || '') +
|
||||
' · 已解密 ' + (Number(d.decrypted) === 1 ? '是' : '否') + '</div>' +
|
||||
'<div style="color:#999;font-size:12px;margin-bottom:8px;padding:6px 10px;background:#fffbe6;border:1px solid #ffe58f;border-radius:3px;">' +
|
||||
'敏感加密字段已打码,其余明文信息完整展示</div>' +
|
||||
'<pre style="background:#f7f7f7;border:1px solid #e6e6e6;border-radius:3px;padding:12px;font-family:Menlo,Monaco,Consolas,monospace;font-size:12px;line-height:1.5;max-height:560px;overflow:auto;white-space:pre-wrap;word-break:break-all;">' +
|
||||
esc(JSON.stringify(detail, null, 2)) + '</pre></div>';
|
||||
layer.open({ type: 1, title: '明文详情 #' + (d.id || ''), area: ['960px', '80%'], content: html });
|
||||
}).fail(function () {
|
||||
layer.closeAll('loading');
|
||||
layer.msg('加载失败');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (tab === 'wallets') {
|
||||
|
||||
Reference in New Issue
Block a user