mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-08 20:25:19 +02:00
refactor(editor): improve SourceCodeEditor styling and enhance scrollbar behavior
This commit is contained in:
parent
3f203f8c49
commit
fe9ffa1413
2 changed files with 11 additions and 7 deletions
|
|
@ -256,12 +256,9 @@ export function EditorPanelContent({
|
|||
|
||||
return (
|
||||
<>
|
||||
<div className="flex items-center justify-between px-4 py-2 shrink-0 border-b">
|
||||
<div className="flex h-14 items-center justify-between px-4 shrink-0 border-b">
|
||||
<div className="flex-1 min-w-0">
|
||||
<h2 className="text-sm font-semibold truncate">{displayTitle}</h2>
|
||||
{isEditableType && editedMarkdown !== null && (
|
||||
<p className="text-[10px] text-muted-foreground">Unsaved changes</p>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex items-center gap-1 shrink-0">
|
||||
{!isLocalFileMode && editorDoc?.document_type && documentId && (
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ export function SourceCodeEditor({
|
|||
const isManualSaveEnabled = !!onSave && !readOnly && (saveMode === "manual" || saveMode === "both");
|
||||
|
||||
return (
|
||||
<div className="h-full w-full overflow-hidden bg-sidebar">
|
||||
<div className="h-full w-full overflow-hidden bg-sidebar [&_.monaco-scrollable-element_.scrollbar_.slider]:rounded-full [&_.monaco-scrollable-element_.scrollbar_.slider]:bg-foreground/25 [&_.monaco-scrollable-element_.scrollbar_.slider:hover]:bg-foreground/40">
|
||||
<MonacoEditor
|
||||
path={path}
|
||||
language={language}
|
||||
|
|
@ -106,10 +106,17 @@ export function SourceCodeEditor({
|
|||
renderLineHighlight: "none",
|
||||
selectionHighlight: false,
|
||||
occurrencesHighlight: "off",
|
||||
quickSuggestions: false,
|
||||
suggestOnTriggerCharacters: false,
|
||||
acceptSuggestionOnEnter: "off",
|
||||
parameterHints: { enabled: false },
|
||||
wordBasedSuggestions: "off",
|
||||
wordWrap: "off",
|
||||
scrollbar: {
|
||||
vertical: "hidden",
|
||||
horizontal: "hidden",
|
||||
vertical: "auto",
|
||||
horizontal: "auto",
|
||||
verticalScrollbarSize: 8,
|
||||
horizontalScrollbarSize: 8,
|
||||
alwaysConsumeMouseWheel: false,
|
||||
},
|
||||
tabSize: 2,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue