diff --git a/frontend/src/lib/components/SimpleEditor.svelte b/frontend/src/lib/components/SimpleEditor.svelte
index 741d874f81..f1c4daa962 100644
--- a/frontend/src/lib/components/SimpleEditor.svelte
+++ b/frontend/src/lib/components/SimpleEditor.svelte
@@ -95,6 +95,7 @@
loadAsync = false,
key,
disabled = false,
+ readOnly = false,
minHeight = 1000,
renderLineHighlight = 'none',
suggestion
@@ -123,6 +124,9 @@
initialCursorPos?: IPosition
key?: string
disabled?: boolean
+ /** Read-only Monaco mode: not editable, but still scrollable/selectable
+ * (unlike `disabled`, which makes the editor non-interactive). */
+ readOnly?: boolean
minHeight?: number
renderLineHighlight?: 'all' | 'line' | 'gutter' | 'none'
suggestion?: string
@@ -239,6 +243,9 @@
lineNumbers: $relativeLineNumbers ? 'relative' : 'on'
})
})
+ $effect(() => {
+ editor?.updateOptions({ readOnly })
+ })
function onVimDisable() {
vimDisposable?.dispose()
@@ -342,6 +349,7 @@
),
model,
...(yPadding !== undefined ? { padding: { bottom: yPadding, top: yPadding } } : {}),
+ readOnly,
renderLineHighlight,
lineDecorationsWidth: 0,
lineNumbersMinChars: 2,
diff --git a/frontend/src/lib/components/workspaceSettings/DataTableMigrationsButton.svelte b/frontend/src/lib/components/workspaceSettings/DataTableMigrationsButton.svelte
index 18544e0cb6..df14302d8c 100644
--- a/frontend/src/lib/components/workspaceSettings/DataTableMigrationsButton.svelte
+++ b/frontend/src/lib/components/workspaceSettings/DataTableMigrationsButton.svelte
@@ -453,11 +453,11 @@
{#snippet content()}
-
+
{#if viewMigration?.code_down}
-
+
{:else}
No down migration
{/if}