()
| 409 | |
| 410 | // ===== Clear logs ===== |
| 411 | async function clearLogs(){ |
| 412 | if(!confirm('确定清空所有日志?此操作不可恢复。'))return; |
| 413 | try{ |
| 414 | await fetch(authQ('/api/logs/clear'),{method:'POST'}); |
| 415 | reqs=[];rmap={};logs=[];selId=null;curPayload=null; |
| 416 | renderRL();updCnt();updStats();desel(); |
| 417 | }catch(e){console.error(e)} |
| 418 | } |
| 419 | |
| 420 | // ===== Keyboard ===== |
| 421 | document.addEventListener('keydown',e=>{ |