diff --git a/frontend/dcViewer.css b/frontend/dcViewer.css index 6bacb90..c7c3012 100644 --- a/frontend/dcViewer.css +++ b/frontend/dcViewer.css @@ -1696,6 +1696,7 @@ header { .comment-card-modal { position: fixed; --env-control-h: 42px; + --comment-modal-min-width: 660px; --ops-comment-accent: var(--comment-target-active, #c4ff67); --ops-detail-bg: var(--nodedc-glass-panel-bg); --ops-detail-surface: rgba(255, 255, 255, 0.048); @@ -1707,6 +1708,7 @@ header { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: min(880px, calc(100vw - 48px)); + min-width: min(var(--comment-modal-min-width), calc(100vw - 24px)); max-height: min(820px, calc(100vh - 68px)); overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.06); @@ -2111,12 +2113,14 @@ header { font-size: 15px; font-weight: 760; line-height: 1.2; + white-space: nowrap; } .ops-detail-dropzone__copy span { color: rgba(245, 245, 250, 0.52); font-size: 13px; line-height: 1.2; + white-space: nowrap; } .comment-attach-button { @@ -2130,6 +2134,7 @@ header { font-size: 13px; font-weight: 800; padding: 0 14px; + white-space: nowrap; } .comment-attach-button:hover { @@ -2377,6 +2382,7 @@ header { top: 14px; left: 12px; width: calc(100vw - 24px); + min-width: 0; max-height: calc(100vh - 28px); border-radius: 24px; } @@ -2392,6 +2398,11 @@ header { grid-template-columns: 30px minmax(0, 1fr); } + .ops-detail-dropzone__copy strong, + .ops-detail-dropzone__copy span { + white-space: normal; + } + .ops-detail-dropzone .comment-attach-button { grid-column: 2; justify-self: start; diff --git a/frontend/dcViewer.js b/frontend/dcViewer.js index 5d8f4d0..3a3c2e3 100644 --- a/frontend/dcViewer.js +++ b/frontend/dcViewer.js @@ -553,6 +553,13 @@ const setCommentModalError = (message = "") => { commentModalError.hidden = !text; }; +const setCommentModalSubtitle = (text = "") => { + if (!commentModalSubtitle) return; + const value = String(text || "").trim(); + commentModalSubtitle.textContent = value; + commentModalSubtitle.hidden = !value; +}; + const bringFloatingWindowToFront = (id) => { if (!id) return; floatingWindowOrder = [...floatingWindowOrder.filter((item) => item !== id), id]; @@ -1233,9 +1240,7 @@ const openCommentModalForTarget = () => { commentTitleInput && (commentTitleInput.value = ""); commentBodyInput && (commentBodyInput.value = ""); commentReplyInput && (commentReplyInput.value = ""); - if (commentModalSubtitle) { - commentModalSubtitle.textContent = "BIM-COMMENT"; - } + setCommentModalSubtitle(); if (commentModalEditedMeta) { const [x, y, z] = commentContextTarget.worldPos || []; commentModalEditedMeta.textContent = Number.isFinite(x) @@ -1263,9 +1268,7 @@ const openCommentModalForComment = (commentId) => { commentTitleInput && (commentTitleInput.value = comment.title || ""); commentBodyInput && (commentBodyInput.value = comment.body || ""); commentReplyInput && (commentReplyInput.value = ""); - if (commentModalSubtitle) { - commentModalSubtitle.textContent = comment.id || "BIM-COMMENT"; - } + setCommentModalSubtitle(); if (commentModalEditedMeta) { commentModalEditedMeta.textContent = `Последнее редактирование: ${formatDateTime(comment.updatedAt || comment.createdAt)}`; } @@ -1344,9 +1347,7 @@ const syncCommentModalAfterSave = (comment) => { commentDraftSubitems = Array.isArray(comment.subitems) ? comment.subitems.map((item) => ({ ...item })) : []; - if (commentModalSubtitle) { - commentModalSubtitle.textContent = comment.id || "BIM-COMMENT"; - } + setCommentModalSubtitle(); if (commentModalEditedMeta) { commentModalEditedMeta.textContent = `Последнее редактирование: ${formatDateTime(comment.updatedAt || comment.createdAt)}`; } @@ -5658,7 +5659,7 @@ const loadProjectSnapshot = async (project) => { registerFloatingWindowElement("commentModal", commentModal); setupDraggableFixedWindow(commentsPanel, commentsPanelHeader); setupDraggableFixedWindow(commentModal, commentModalHeader); - setupResizableFixedWindow(commentModal, { minWidth: 560, minHeight: 420 }); + setupResizableFixedWindow(commentModal, { minWidth: 660, minHeight: 420 }); commentsCollapseButton?.addEventListener("click", () => setCommentsCollapsed(true)); commentsRestoreButton?.addEventListener("click", () => { commentsModeActive = true; diff --git a/frontend/index.html b/frontend/index.html index 5faa064..41a08e6 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -203,7 +203,7 @@ - +