fix: proper padding applied to the monaco editors

This commit is contained in:
2025-01-25 07:41:32 +07:00
parent a4f3f3552e
commit 4680aa9f9f
4 changed files with 11 additions and 3 deletions

View File

@@ -45,6 +45,11 @@ public partial class CaddyfileEditor : ComponentBase
Language = "graphql",
Value = _caddyConfigurationContent,
Theme = "vs-dark",
Padding = new EditorPaddingOptions
{
Top = 8f,
Bottom = 8f,
}
};
}

View File

@@ -13,7 +13,6 @@
<MudText Typo="Typo.caption" Style="padding-left: 18px; padding-bottom: 8px;">File content</MudText>
<StandaloneCodeEditor @ref="_codeEditor" ConstructionOptions="@EditorConstructionOptions"
CssClass="caddy-file-editor global-caddy"></StandaloneCodeEditor>
<MudDivider/>
</MudCardContent>
<MudCardActions>
<MudContainer Class="d-flex flex-row-reverse flex-grow-1 gap-4">

View File

@@ -26,9 +26,14 @@ public partial class CaddyfilePage : ComponentBase
return new StandaloneEditorConstructionOptions
{
AutomaticLayout = true,
Language = "plaintext",
Language = "graphql",
Value = _caddyConfigurationContent,
Theme = "vs-dark",
Padding = new EditorPaddingOptions
{
Top = 8f,
Bottom = 8f,
}
};
}

View File

@@ -11,5 +11,4 @@
.caddy-file-editor .monaco-editor {
overflow: hidden;
border-radius: inherit;
padding: 8px;
}