mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-20 08:01:35 +00:00
fix(frontend): prevent label interference with monaco editor in instance settings (#6701)
This commit is contained in:
@@ -353,13 +353,21 @@
|
||||
</div>
|
||||
{/if}
|
||||
{:else if setting.fieldType == 'codearea'}
|
||||
<SimpleEditor
|
||||
autoHeight
|
||||
class="editor"
|
||||
lang={setting.codeAreaLang ?? 'txt'}
|
||||
bind:code={$values[setting.key]}
|
||||
fixedOverflowWidgets={false}
|
||||
/>
|
||||
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
<div
|
||||
onclick={(ev) => {
|
||||
ev.stopPropagation() // this is to prevent wrapping label interference
|
||||
}}
|
||||
>
|
||||
<SimpleEditor
|
||||
autoHeight
|
||||
class="editor"
|
||||
lang={setting.codeAreaLang ?? 'txt'}
|
||||
bind:code={$values[setting.key]}
|
||||
fixedOverflowWidgets={false}
|
||||
/></div
|
||||
>
|
||||
{:else if setting.fieldType == 'license_key'}
|
||||
{@const { valid, expiration } = parseLicenseKey($values[setting.key] ?? '')}
|
||||
<div class="flex gap-2">
|
||||
|
||||
@@ -266,28 +266,36 @@
|
||||
<label class="block pb-2">
|
||||
<span class="text-primary font-semibold text-sm">Service Account Key</span>
|
||||
<span class="text-tertiary text-2xs">JSON content of the service account key file</span>
|
||||
<SimpleEditor
|
||||
lang="json"
|
||||
bind:code={
|
||||
() => {
|
||||
if (bucket_config?.type === 'Gcs') {
|
||||
return JSON.stringify(bucket_config.serviceAccountKey)
|
||||
} else {
|
||||
return '{}'
|
||||
}
|
||||
},
|
||||
(v) => {
|
||||
if (bucket_config?.type === 'Gcs') {
|
||||
try {
|
||||
bucket_config.serviceAccountKey = JSON.parse(v ?? '{}')
|
||||
} catch (_) {
|
||||
bucket_config.serviceAccountKey = {}
|
||||
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
<div
|
||||
onclick={(ev) => {
|
||||
ev.stopPropagation() // this is to prevent wrapping label interference
|
||||
}}
|
||||
>
|
||||
<SimpleEditor
|
||||
lang="json"
|
||||
bind:code={
|
||||
() => {
|
||||
if (bucket_config?.type === 'Gcs') {
|
||||
return JSON.stringify(bucket_config.serviceAccountKey)
|
||||
} else {
|
||||
return '{}'
|
||||
}
|
||||
},
|
||||
(v) => {
|
||||
if (bucket_config?.type === 'Gcs') {
|
||||
try {
|
||||
bucket_config.serviceAccountKey = JSON.parse(v ?? '{}')
|
||||
} catch (_) {
|
||||
bucket_config.serviceAccountKey = {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
class="h-80"
|
||||
/>
|
||||
class="h-80"
|
||||
/>
|
||||
</div>
|
||||
</label>
|
||||
{:else}
|
||||
<div>Unknown bucket type {bucket_config['type']}</div>
|
||||
|
||||
Reference in New Issue
Block a user