This commit is contained in:
2026-07-28 18:05:08 +08:00
parent 24bfe66773
commit 3f9f95b5ef
3 changed files with 22 additions and 20 deletions

View File

@@ -110,17 +110,17 @@ body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-
/* 可编辑详情弹窗 */ /* 可编辑详情弹窗 */
.detail-modal { max-height: 90vh; overflow-y: auto; padding: 0; } .detail-modal { max-height: 90vh; overflow-y: auto; padding: 0; }
.detail-modal .modal-close-btn { display: none; } .detail-modal input, .detail-modal select, .detail-modal textarea { margin: 0; }
.detail-header { background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); color: #fff; padding: 8px 16px; display: flex; align-items: center; gap: 8px; border-radius: 12px 12px 0 0; margin: -16px -16px 0 -16px; } .detail-header { background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); color: #fff; padding: 8px 12px 8px 16px; display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 1; }
.detail-header .icon-btn { flex-shrink: 0; } .detail-header .icon-btn { flex-shrink: 0; margin-left: auto; }
.detail-header .icon-btn svg { stroke: #fff; } .detail-header .icon-btn svg { stroke: #fff; }
.detail-title-input { flex: 1; font-size: 18px; font-weight: 600; color: #fff; background: transparent; border: none; outline: none; padding: 4px 0; min-width: 0; } .detail-title-input { flex: 1; font-size: 18px; font-weight: 600; color: #fff; background: transparent; border: none; outline: none; padding: 4px 0; min-width: 0; }
.detail-title-input::placeholder { color: rgba(255,255,255,0.6); } .detail-title-input::placeholder { color: rgba(255,255,255,0.6); }
.detail-title-input:focus { border-bottom: 2px solid rgba(255,255,255,0.5); } .detail-title-input:focus { border: none; outline: none; }
.edit-form { padding: 12px 0 0 0; } .edit-form { padding: 12px 16px 16px 16px; }
.edit-row { display: flex; align-items: center; margin-bottom: 6px; gap: 8px; } .edit-row { display: flex; align-items: center; margin-bottom: 8px; gap: 8px; }
.edit-row label { min-width: 48px; font-size: 13px; color: #777; text-align: right; } .edit-row label { min-width: 48px; font-size: 13px; color: #777; text-align: right; flex-shrink: 0; }
.edit-row input, .edit-row select, .edit-row textarea { flex: 1; padding: 6px 8px; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 14px; outline: none; } .edit-row input, .edit-row select, .edit-row textarea { flex: 1; padding: 7px 8px; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 14px; outline: none; margin: 0; }
.edit-row input:focus, .edit-row select:focus, .edit-row textarea:focus { border-color: #3b82f6; } .edit-row input:focus, .edit-row select:focus, .edit-row textarea:focus { border-color: #3b82f6; }
.edit-row select { appearance: auto; } .edit-row select { appearance: auto; }
.edit-row textarea { resize: vertical; min-height: 40px; } .edit-row textarea { resize: vertical; min-height: 40px; }
@@ -137,13 +137,13 @@ details[open] .history-summary::after { content: '收起'; }
.attach-gallery { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; } .attach-gallery { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.attach-thumb-wrap { position: relative; display: inline-block; } .attach-thumb-wrap { position: relative; display: inline-block; }
.attach-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid #eee; } .attach-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid #eee; }
.attach-del-btn { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; background: #e53e3e; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; } .attach-del-btn { position: absolute; top: -4px; right: -4px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,0.5); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.attach-del-btn svg { width: 11px; height: 11px; stroke: #fff; fill: none; stroke-width: 2; } .attach-del-btn svg { width: 10px; height: 10px; stroke: #fff; fill: none; stroke-width: 2.5; }
.attach-add-btn { cursor: pointer; display: flex; align-items: center; } .attach-add-btn { cursor: pointer; display: flex; align-items: center; }
.attach-add-btn svg { width: 18px; height: 18px; stroke: #3b82f6; fill: none; stroke-width: 2; } .attach-add-btn svg { width: 18px; height: 18px; stroke: #3b82f6; fill: none; stroke-width: 2; }
.edit-buttons { display: flex; gap: 8px; margin-top: 12px; } .edit-buttons { display: flex; margin-top: 12px; }
.save-btn { flex: 1; background: #3b82f6; color: #fff; border: none; padding: 8px 0; border-radius: 6px; font-size: 15px; cursor: pointer; font-weight: 500; } .save-btn { flex: 1; background: #3b82f6; color: #fff; border: none; padding: 10px 0; border-radius: 6px; font-size: 15px; cursor: pointer; font-weight: 500; }
.danger-btn { background: transparent; color: #e53e3e; border: 1px solid #e53e3e; padding: 8px 16px; border-radius: 6px; font-size: 14px; cursor: pointer; } .danger-btn { background: transparent; color: #e53e3e; border: 1px solid #e53e3e; padding: 8px 16px; border-radius: 6px; font-size: 14px; cursor: pointer; flex-shrink: 0; margin-left: 8px; }
.white-list-tag { .white-list-tag {
font-size: 12px; font-size: 12px;

View File

@@ -80,7 +80,14 @@ async function openDetail(pid) {
// 删除按钮仅管理员可见 // 删除按钮仅管理员可见
const isAdmin = localStorage.getItem('isAdmin') === 'true'; const isAdmin = localStorage.getItem('isAdmin') === 'true';
document.getElementById('delete-purchase-btn').style.display = isAdmin ? '' : 'none'; const delBtn = document.getElementById('delete-purchase-btn');
if (isAdmin) {
delBtn.style.display = '';
delBtn.style.marginLeft = '';
} else {
delBtn.style.display = 'none';
delBtn.style.marginLeft = '0';
}
document.getElementById('detail-modal').classList.remove('hidden'); document.getElementById('detail-modal').classList.remove('hidden');
} }

View File

@@ -27,11 +27,6 @@ const Store = {
logout() { logout() {
if (Store.ws) { Store.ws.close(); Store.ws = null; } if (Store.ws) { Store.ws.close(); Store.ws = null; }
Store.clearAuth(); Store.clearAuth();
document.getElementById('login-page').classList.remove('hidden'); location.reload();
document.getElementById('main-page').classList.add('hidden');
Store.currentRoom = null;
Store.rooms = [];
document.getElementById('chat-list-container').innerHTML = '';
document.getElementById('messages-container').innerHTML = '';
}, },
}; };