diff --git a/frontend/src/components/LargeMarkdownViewer/LargeMarkdownViewer.css b/frontend/src/components/LargeMarkdownViewer/LargeMarkdownViewer.css index 635d42b..bee620d 100644 --- a/frontend/src/components/LargeMarkdownViewer/LargeMarkdownViewer.css +++ b/frontend/src/components/LargeMarkdownViewer/LargeMarkdownViewer.css @@ -32,11 +32,14 @@ width: 100%; } +/* 与其它 Markdown 阅读面用同一套盒模型:留白算在 max-width 之内, + 这样大屏下正文列宽跟浏览模式/分享页/预览区分毫不差。 */ .markdown-block { - max-width: 920px; - width: calc(100% - 48px); + box-sizing: border-box; + max-width: var(--content-max-width); + width: 100%; margin: 0 auto; - padding: 0 0 1px; + padding: 0 var(--space-lg) 1px; } /* 首块下移,避免被固定浮动的提示窗遮挡 */ @@ -63,12 +66,12 @@ @media (max-width: 768px) { .markdown-block { - width: calc(100% - 32px); + padding-inline: var(--space-md); } } @media (max-width: 480px) { .markdown-block { - width: calc(100% - 24px); + padding-inline: var(--space-sm); } } diff --git a/frontend/src/pages/Document/DocumentEditor.css b/frontend/src/pages/Document/DocumentEditor.css index 17eb226..1b6994b 100644 --- a/frontend/src/pages/Document/DocumentEditor.css +++ b/frontend/src/pages/Document/DocumentEditor.css @@ -214,6 +214,15 @@ width: 100%; } +/* 编辑模式里的文件夹视图:与浏览模式用同一套居中和行长, + 否则首次直接进入编辑模式(浏览模式样式尚未加载)时内容会一路铺到边。 */ +.docs-content-wrapper { + max-width: var(--content-max-width); + margin: 0 auto; + padding: var(--space-lg); + min-height: 100%; +} + /* PDF 只读预览(编辑模式下内置,与浏览模式一致) */ .pdf-editor-container { flex: 1; @@ -542,7 +551,7 @@ /* 预览区继续保留「可读行长」,但跟着视口放宽:ByteMD 固定在 800px, 宽屏分栏/仅预览时同样会留出大片空白,这里放到 1100px 并保证不留横向死边。 */ .bytemd-wrapper .bytemd-preview .markdown-body { - max-width: min(100%, 1100px); + max-width: min(100%, var(--content-max-width)); margin: 0 auto; padding: var(--space-md) var(--space-lg); } @@ -661,7 +670,7 @@ } } -/* 新建/重命名弹窗的补充说明:解释后缀规则,避免用户以为后缀被吞掉了 */ +/* 弹窗里的补充说明:只在新建文件时用一次,解释省略后缀的默认行为 */ .modal-field-hint { margin-top: var(--space-xs); font-size: 12px; @@ -669,13 +678,6 @@ color: var(--text-color-secondary); } -.modal-field-hint code { - padding: 0 var(--space-xxs); - color: var(--text-color); - background: var(--code-bg); - border-radius: var(--radius-xs); -} - /* 未保存改动标记:与保存按钮同处内容区右上角,弱化但可辨识 */ .content-header-actions .unsaved-badge { display: inline-flex; diff --git a/frontend/src/pages/Document/DocumentEditor.jsx b/frontend/src/pages/Document/DocumentEditor.jsx index 028e3d4..dd6415a 100644 --- a/frontend/src/pages/Document/DocumentEditor.jsx +++ b/frontend/src/pages/Document/DocumentEditor.jsx @@ -1824,9 +1824,6 @@ function DocumentEditor() { addonAfter={operationType === 'rename' ? lockedExtension || null : null} {...nameInputImeSubmit} /> - {operationType === 'rename' && lockedExtension && ( -
{lockedExtension} 由文件类型决定,已锁定,重命名不会改动它