mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-19 05:09:26 +01:00
refac
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
import { getFunctions } from '$lib/apis/functions';
|
||||
import { getKnowledgeItems } from '$lib/apis/knowledge';
|
||||
import AccessControl from '../common/AccessControl.svelte';
|
||||
import { stringify } from 'postcss';
|
||||
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
@@ -159,6 +160,7 @@
|
||||
}
|
||||
|
||||
if (model) {
|
||||
console.log(model);
|
||||
name = model.name;
|
||||
await tick();
|
||||
|
||||
@@ -166,7 +168,7 @@
|
||||
|
||||
if (model.base_model_id) {
|
||||
const base_model = $models
|
||||
.filter((m) => !m?.preset && m?.owned_by !== 'arena')
|
||||
.filter((m) => !m?.preset && !(m?.arena ?? false))
|
||||
.find((m) => [model.base_model_id, `${model.base_model_id}:latest`].includes(m.id));
|
||||
|
||||
console.log('base_model', base_model);
|
||||
@@ -213,6 +215,9 @@
|
||||
|
||||
accessControl = model?.access_control ?? null;
|
||||
|
||||
console.log(model?.access_control);
|
||||
console.log(accessControl);
|
||||
|
||||
info = {
|
||||
...info,
|
||||
...JSON.parse(
|
||||
@@ -491,6 +496,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="my-2">
|
||||
<div class="px-3 py-2 bg-gray-50 dark:bg-gray-950 rounded-lg">
|
||||
<AccessControl
|
||||
{accessControl}
|
||||
onChange={(_accessControl) => {
|
||||
accessControl = _accessControl;
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class=" border-gray-50 dark:border-gray-850 my-1.5" />
|
||||
|
||||
<div class="my-2">
|
||||
@@ -670,12 +686,6 @@
|
||||
<Capabilities bind:capabilities />
|
||||
</div>
|
||||
|
||||
<div class="my-2">
|
||||
<div class="px-3 py-2 bg-gray-50 dark:bg-gray-950 rounded-lg">
|
||||
<AccessControl bind:accessControl />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="my-2 text-gray-300 dark:text-gray-700">
|
||||
<div class="flex w-full justify-between mb-2">
|
||||
<div class=" self-center text-sm font-semibold">{$i18n.t('JSON Preview')}</div>
|
||||
|
||||
Reference in New Issue
Block a user