mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
fix/refac: hide system prompt for users w/o permission
This commit is contained in:
parent
9063942055
commit
f7fae947a7
1 changed files with 12 additions and 10 deletions
|
|
@ -88,17 +88,19 @@
|
||||||
|
|
||||||
<hr class=" border-gray-50 dark:border-gray-850 my-2.5 w-full" />
|
<hr class=" border-gray-50 dark:border-gray-850 my-2.5 w-full" />
|
||||||
|
|
||||||
<div class="my-1">
|
{#if $user?.role === 'admin' || ($user?.permissions.chat?.system_prompt ?? true)}
|
||||||
<div class="mb-2 text-xs text-gray-500">{$i18n.t('System Prompt')}</div>
|
<div class="my-1">
|
||||||
<div>
|
<div class="mb-2 text-xs text-gray-500">{$i18n.t('System Prompt')}</div>
|
||||||
<Textarea
|
<div>
|
||||||
className=" text-sm w-full bg-transparent outline-hidden "
|
<Textarea
|
||||||
placeholder={`Write your model system prompt content here\ne.g.) You are Mario from Super Mario Bros, acting as an assistant.`}
|
className=" text-sm w-full bg-transparent outline-hidden "
|
||||||
maxSize={200}
|
placeholder={`Write your model system prompt content here\ne.g.) You are Mario from Super Mario Bros, acting as an assistant.`}
|
||||||
bind:value={data.system_prompt}
|
maxSize={200}
|
||||||
/>
|
bind:value={data.system_prompt}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{/if}
|
||||||
|
|
||||||
<div class="my-2">
|
<div class="my-2">
|
||||||
<Knowledge bind:selectedItems={data.files}>
|
<Knowledge bind:selectedItems={data.files}>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue