Add files via upload

This commit is contained in:
公明
2026-05-29 17:59:19 +08:00
committed by GitHub
parent 0933f9365b
commit cbcbd414cd
2 changed files with 60 additions and 6 deletions
+34
View File
@@ -21594,6 +21594,40 @@ button.chat-files-dropdown-item:hover:not(:disabled) {
overflow: hidden;
background: #fff;
}
#project-panel-facts {
display: flex;
flex-direction: column;
overflow: hidden;
}
#project-panel-facts .projects-fact-toolbar {
flex: 0 0 auto;
}
#project-panel-facts .projects-table-wrap {
flex: 1 1 auto;
min-height: 0;
max-height: 100%;
overflow: hidden;
}
#project-panel-facts .projects-table-wrap .data-table--projects {
width: 100%;
height: 100%;
table-layout: fixed;
border-spacing: 0;
}
#project-panel-facts .projects-table-wrap .data-table--projects thead,
#project-panel-facts .projects-table-wrap .data-table--projects tbody tr {
display: table;
width: 100%;
table-layout: fixed;
}
#project-panel-facts .projects-table-wrap .data-table--projects tbody {
display: block;
height: calc(100% - 42px);
overflow-y: auto;
overflow-x: hidden;
overscroll-behavior: contain;
-webkit-overflow-scrolling: touch;
}
.projects-table-wrap .data-table--projects {
min-width: 0;
table-layout: fixed;
+26 -6
View File
@@ -226,9 +226,9 @@ function initProjectsModalEscape() {
window._projectsModalEscapeBound = true;
document.addEventListener('keydown', (e) => {
if (e.key !== 'Escape') return;
if (document.getElementById('project-modal')?.style.display === 'flex') closeProjectModal();
else if (document.getElementById('fact-modal')?.style.display === 'flex') closeFactModal();
else if (document.getElementById('fact-detail-modal')?.style.display === 'flex') closeFactDetailModal();
if (isProjectsOverlayVisible('project-modal')) closeProjectModal();
else if (isProjectsOverlayVisible('fact-modal')) closeFactModal();
else if (isProjectsOverlayVisible('fact-detail-modal')) closeFactDetailModal();
});
}
@@ -236,6 +236,7 @@ async function initProjectsPage() {
const page = document.getElementById('page-projects');
if (!page || page.style.display === 'none') return;
initProjectsModalEscape();
syncProjectsModalBodyLock();
updateProjectsDetailVisibility();
await loadProjectsList();
if (!currentProjectId && projectsCache.length) {
@@ -927,18 +928,37 @@ function openProjectsOverlay(id) {
const el = document.getElementById(id);
if (!el) return;
el.style.display = 'flex';
document.body.classList.add('projects-modal-open');
syncProjectsModalBodyLock();
const focusTarget = el.querySelector('input.form-input, textarea.form-input, select.form-input');
if (focusTarget) {
setTimeout(() => focusTarget.focus(), 80);
}
}
function isProjectsOverlayVisible(id) {
const el = document.getElementById(id);
if (!el) return false;
const style = window.getComputedStyle(el);
return style.display !== 'none' && style.visibility !== 'hidden';
}
function hasVisibleProjectsOverlay() {
const overlays = document.querySelectorAll('.projects-modal-overlay');
return Array.from(overlays).some((el) => {
const style = window.getComputedStyle(el);
return style.display !== 'none' && style.visibility !== 'hidden';
});
}
function syncProjectsModalBodyLock() {
if (hasVisibleProjectsOverlay()) document.body.classList.add('projects-modal-open');
else document.body.classList.remove('projects-modal-open');
}
function closeProjectsOverlay(id) {
const el = document.getElementById(id);
if (el) el.style.display = 'none';
const anyOpen = document.querySelector('.projects-modal-overlay[style*="flex"]');
if (!anyOpen) document.body.classList.remove('projects-modal-open');
syncProjectsModalBodyLock();
}
function showNewProjectModal() {