Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| facf39e778 | |||
| 51cecf1f4e |
@@ -1362,9 +1362,15 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||
});
|
||||
|
||||
// 侧边栏过滤
|
||||
document.querySelectorAll('.sidebar a').forEach(a => {
|
||||
document.querySelectorAll('.sidebar a[data-filter]').forEach(a => {
|
||||
a.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
// 如果在回收站视图,先退出
|
||||
if (trashView) {
|
||||
trashView = false;
|
||||
}
|
||||
|
||||
document.querySelectorAll('.sidebar a').forEach(x => x.classList.remove('active'));
|
||||
a.classList.add('active');
|
||||
|
||||
@@ -2334,13 +2340,17 @@ async function loadTrash() {
|
||||
|
||||
function renderTrash(items, total) {
|
||||
const container = document.getElementById('itemList');
|
||||
const paginationContainer = document.getElementById('pagination');
|
||||
|
||||
// 清空分页
|
||||
paginationContainer.innerHTML = '';
|
||||
|
||||
// 显示回收站标题和操作按钮
|
||||
let header = `
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<div>
|
||||
<h5><i class="bi bi-trash"></i> 回收站 (${total} 条数据)</h5>
|
||||
<small class="text-muted">删除的数据可在30天内恢复</small>
|
||||
<small class="text-muted">回收站数据可随时恢复或彻底删除</small>
|
||||
</div>
|
||||
<div>
|
||||
<button class="btn btn-outline-secondary" onclick="hideTrash()">
|
||||
|
||||
Reference in New Issue
Block a user