Skip to content

Commit 05af003

Browse files
committed
enh: warning
1 parent 2f75eef commit 05af003

File tree

1 file changed

+26
-16
lines changed

1 file changed

+26
-16
lines changed

src/lib/components/admin/Settings/CodeExecution.svelte

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,35 @@
4545

4646
<hr class=" border-gray-100 dark:border-gray-850 my-2" />
4747

48-
<div class=" py-0.5 flex w-full justify-between">
49-
<div class=" self-center text-xs font-medium">{$i18n.t('Code Execution Engine')}</div>
50-
<div class="flex items-center relative">
51-
<select
52-
class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 p-1 text-xs bg-transparent outline-hidden text-right"
53-
bind:value={config.CODE_EXECUTION_ENGINE}
54-
placeholder={$i18n.t('Select a engine')}
55-
required
56-
>
57-
<option disabled selected value="">{$i18n.t('Select a engine')}</option>
58-
{#each engines as engine}
59-
<option value={engine}>{engine}</option>
60-
{/each}
61-
</select>
48+
<div class="mb-2.5">
49+
<div class="flex w-full justify-between">
50+
<div class=" self-center text-xs font-medium">{$i18n.t('Code Execution Engine')}</div>
51+
<div class="flex items-center relative">
52+
<select
53+
class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 p-1 text-xs bg-transparent outline-hidden text-right"
54+
bind:value={config.CODE_EXECUTION_ENGINE}
55+
placeholder={$i18n.t('Select a engine')}
56+
required
57+
>
58+
<option disabled selected value="">{$i18n.t('Select a engine')}</option>
59+
{#each engines as engine}
60+
<option value={engine}>{engine}</option>
61+
{/each}
62+
</select>
63+
</div>
6264
</div>
65+
66+
{#if config.CODE_EXECUTION_ENGINE === 'jupyter'}
67+
<div class="text-gray-500 text-xs">
68+
{$i18n.t(
69+
'Warning: Jupyter execution enables arbitrary code execution, posing severe security risks—proceed with extreme caution.'
70+
)}
71+
</div>
72+
{/if}
6373
</div>
6474

6575
{#if config.CODE_EXECUTION_ENGINE === 'jupyter'}
66-
<div class="mt-1 flex flex-col gap-1.5 mb-1 w-full">
76+
<div class="mb-2.5 flex flex-col gap-1.5 w-full">
6777
<div class="text-xs font-medium">
6878
{$i18n.t('Jupyter URL')}
6979
</div>
@@ -81,7 +91,7 @@
8191
</div>
8292
</div>
8393

84-
<div class="mt-1 flex gap-2 mb-1 w-full items-center justify-between">
94+
<div class=" flex gap-2 w-full items-center justify-between">
8595
<div class="text-xs font-medium">
8696
{$i18n.t('Jupyter Auth')}
8797
</div>

0 commit comments

Comments
 (0)