mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-26 23:29:24 -05:00
refac
This commit is contained in:
1 parent
db1ca1afab
commit
b3ce7de8d3
12 files changed
+199
-7
No files matched your search
@@ -1,4 +1,5 @@
|
||||
<script lang="ts">
|
||||
import LockClosed from '$lib/components/icons/LockClosed.svelte';
|
||||
import { getContext } from 'svelte';
|
||||
|
||||
import Dropdown from '$lib/components/common/Dropdown.svelte';
|
||||
@@ -33,6 +34,7 @@
|
||||
export let hideHandler: Function;
|
||||
export let pinModelHandler: Function;
|
||||
export let deleteHandler: Function;
|
||||
export let accessHandler: (() => void) | null = null;
|
||||
export let onClose: Function;
|
||||
|
||||
export let writeAccess: boolean = true;
|
||||
@@ -80,6 +82,18 @@
|
||||
<div class="flex items-center">{$i18n.t('Edit')}</div>
|
||||
</button>
|
||||
{/if}
|
||||
{#if accessHandler && writeAccess}
|
||||
<button
|
||||
type="button"
|
||||
class="select-none flex h-[1.6875rem] w-full cursor-pointer items-center gap-2 rounded-xl bg-transparent px-2 text-[0.8125rem] hover:text-gray-900 dark:hover:text-gray-100"
|
||||
on:click={() => {
|
||||
runAndClose(() => accessHandler?.());
|
||||
}}
|
||||
>
|
||||
<LockClosed className="size-3.5" />
|
||||
<div class="flex items-center">{$i18n.t('Access')}</div>
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
{#if writeAccess}
|
||||
<button
|
||||
|
||||
Reference in new issue
Block a user