mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-27 15:49:23 -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, createEventDispatcher } from 'svelte';
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
@@ -9,9 +10,10 @@
|
||||
import Download from '$lib/components/icons/Download.svelte';
|
||||
import EllipsisHorizontal from '$lib/components/icons/EllipsisHorizontal.svelte';
|
||||
|
||||
const i18n = getContext('i18n');
|
||||
const i18n = getContext<typeof import('$lib/i18n').default>('i18n');
|
||||
|
||||
export let onExport: null | Function = null;
|
||||
export let accessHandler: (() => void) | null = null;
|
||||
export let onClose: Function = () => {};
|
||||
|
||||
let show = false;
|
||||
@@ -50,6 +52,20 @@
|
||||
|
||||
<div slot="content">
|
||||
<DropdownMenu className="min-w-[10.625rem]">
|
||||
{#if accessHandler}
|
||||
<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={() => {
|
||||
accessHandler?.();
|
||||
closeMenu();
|
||||
}}
|
||||
>
|
||||
<LockClosed className="size-3.5" />
|
||||
<div class="flex items-center">{$i18n.t('Access')}</div>
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
{#if onExport}
|
||||
<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"
|
||||
|
||||
Reference in new issue
Block a user