FIX: Enable scrollbars in CodeMirror editors and complete missing i18n

CodeMirror Scrollbar Fixes:
- Add EditorView.theme configurations with overflow: auto for .cm-scroller
- Configure scrollPastEnd: false in basicSetup for all CodeMirror instances
- Fix FileViewer, CredentialEditor, HostManagerEditor, and FileManagerFileEditor
- Ensure proper height: 100% styling for editor containers

i18n Completion:
- Add missing "movedItems" translation key for file move operations
- English: "Moved {{count}} items"
- Chinese: "已移动 {{count}} 个项目"

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
ZacharyZcR
2025-09-25 07:35:28 +08:00
parent dad9282dfa
commit c7f86d5ac8
6 changed files with 72 additions and 9 deletions

View File

@@ -320,16 +320,26 @@ export function FileManagerFileEditor({
EditorView.theme({
"&": {
backgroundColor: "var(--color-dark-bg-darkest) !important",
height: "100%",
},
".cm-gutters": {
backgroundColor: "var(--color-dark-bg) !important",
},
".cm-scroller": {
overflow: "auto",
},
".cm-editor": {
height: "100%",
},
}),
]}
onChange={(value: any) => onContentChange(value)}
theme={undefined}
height="100%"
basicSetup={{ lineNumbers: true }}
basicSetup={{
lineNumbers: true,
scrollPastEnd: false,
}}
className="min-h-full min-w-full flex-1"
/>
</div>