mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 13:55:19 +00:00
revert: code editor dynamic import
This commit is contained in:
parent
05c46008da
commit
1df5f1f9f6
3 changed files with 42 additions and 45 deletions
|
|
@ -8,6 +8,7 @@
|
||||||
import Badge from '$lib/components/common/Badge.svelte';
|
import Badge from '$lib/components/common/Badge.svelte';
|
||||||
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
||||||
import ChevronLeft from '$lib/components/icons/ChevronLeft.svelte';
|
import ChevronLeft from '$lib/components/icons/ChevronLeft.svelte';
|
||||||
|
import CodeEditor from '$lib/components/common/CodeEditor.svelte';
|
||||||
|
|
||||||
let formElement = null;
|
let formElement = null;
|
||||||
let loading = false;
|
let loading = false;
|
||||||
|
|
@ -366,7 +367,6 @@ class Pipe:
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-2 flex-1 overflow-auto h-0 rounded-lg">
|
<div class="mb-2 flex-1 overflow-auto h-0 rounded-lg">
|
||||||
{#await import('$lib/components/common/CodeEditor.svelte') then { default: CodeEditor }}
|
|
||||||
<CodeEditor
|
<CodeEditor
|
||||||
bind:this={codeEditor}
|
bind:this={codeEditor}
|
||||||
value={content}
|
value={content}
|
||||||
|
|
@ -381,7 +381,6 @@ class Pipe:
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{/await}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pb-3 flex justify-between">
|
<div class="pb-3 flex justify-between">
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@
|
||||||
import ChevronUpDown from '$lib/components/icons/ChevronUpDown.svelte';
|
import ChevronUpDown from '$lib/components/icons/ChevronUpDown.svelte';
|
||||||
import CommandLine from '$lib/components/icons/CommandLine.svelte';
|
import CommandLine from '$lib/components/icons/CommandLine.svelte';
|
||||||
import Cube from '$lib/components/icons/Cube.svelte';
|
import Cube from '$lib/components/icons/Cube.svelte';
|
||||||
|
import CodeEditor from '$lib/components/common/CodeEditor.svelte';
|
||||||
|
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
|
|
@ -480,7 +481,6 @@
|
||||||
|
|
||||||
{#if !collapsed}
|
{#if !collapsed}
|
||||||
{#if edit}
|
{#if edit}
|
||||||
{#await import('$lib/components/common/CodeEditor.svelte') then { default: CodeEditor }}
|
|
||||||
<CodeEditor
|
<CodeEditor
|
||||||
value={code}
|
value={code}
|
||||||
{id}
|
{id}
|
||||||
|
|
@ -492,7 +492,6 @@
|
||||||
_code = value;
|
_code = value;
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{/await}
|
|
||||||
{:else}
|
{:else}
|
||||||
<pre
|
<pre
|
||||||
class=" hljs p-4 px-5 overflow-x-auto"
|
class=" hljs p-4 px-5 overflow-x-auto"
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
import LockClosed from '$lib/components/icons/LockClosed.svelte';
|
import LockClosed from '$lib/components/icons/LockClosed.svelte';
|
||||||
import AccessControlModal from '../common/AccessControlModal.svelte';
|
import AccessControlModal from '../common/AccessControlModal.svelte';
|
||||||
import { user } from '$lib/stores';
|
import { user } from '$lib/stores';
|
||||||
|
import CodeEditor from '$lib/components/common/CodeEditor.svelte';
|
||||||
|
|
||||||
let formElement = null;
|
let formElement = null;
|
||||||
let loading = false;
|
let loading = false;
|
||||||
|
|
@ -285,7 +286,6 @@ class Tools:
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-2 flex-1 overflow-auto h-0 rounded-lg">
|
<div class="mb-2 flex-1 overflow-auto h-0 rounded-lg">
|
||||||
{#await import('$lib/components/common/CodeEditor.svelte') then { default: CodeEditor }}
|
|
||||||
<CodeEditor
|
<CodeEditor
|
||||||
bind:this={codeEditor}
|
bind:this={codeEditor}
|
||||||
value={content}
|
value={content}
|
||||||
|
|
@ -300,7 +300,6 @@ class Tools:
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{/await}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pb-3 flex justify-between">
|
<div class="pb-3 flex justify-between">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue