mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
refac
Some checks are pending
Deploy to HuggingFace Spaces / check-secret (push) Waiting to run
Deploy to HuggingFace Spaces / deploy (push) Blocked by required conditions
Create and publish Docker images with specific build args / build-main-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-main-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda126-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda126-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / build-slim-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-slim-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / merge-main-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-cuda-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-cuda126-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-ollama-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-slim-images (push) Blocked by required conditions
Python CI / Format Backend (push) Waiting to run
Frontend Build / Format & Build Frontend (push) Waiting to run
Frontend Build / Frontend Unit Tests (push) Waiting to run
Some checks are pending
Deploy to HuggingFace Spaces / check-secret (push) Waiting to run
Deploy to HuggingFace Spaces / deploy (push) Blocked by required conditions
Create and publish Docker images with specific build args / build-main-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-main-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda126-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda126-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / build-slim-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-slim-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / merge-main-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-cuda-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-cuda126-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-ollama-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-slim-images (push) Blocked by required conditions
Python CI / Format Backend (push) Waiting to run
Frontend Build / Format & Build Frontend (push) Waiting to run
Frontend Build / Frontend Unit Tests (push) Waiting to run
This commit is contained in:
parent
46a3f7de5e
commit
f47214314b
3 changed files with 43 additions and 23 deletions
|
|
@ -411,6 +411,8 @@
|
||||||
{#if (filteredModels ?? []).length !== 0}
|
{#if (filteredModels ?? []).length !== 0}
|
||||||
<div class=" px-3 my-2 gap-1 lg:gap-2 grid lg:grid-cols-2" id="model-list">
|
<div class=" px-3 my-2 gap-1 lg:gap-2 grid lg:grid-cols-2" id="model-list">
|
||||||
{#each filteredModels as model (model.id)}
|
{#each filteredModels as model (model.id)}
|
||||||
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||||
|
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
||||||
<div
|
<div
|
||||||
class=" flex cursor-pointer dark:hover:bg-gray-850/50 hover:bg-gray-50 transition rounded-2xl w-full p-2.5"
|
class=" flex cursor-pointer dark:hover:bg-gray-850/50 hover:bg-gray-50 transition rounded-2xl w-full p-2.5"
|
||||||
id="model-item-{model.id}"
|
id="model-item-{model.id}"
|
||||||
|
|
@ -498,6 +500,11 @@
|
||||||
<ModelMenu
|
<ModelMenu
|
||||||
user={$user}
|
user={$user}
|
||||||
{model}
|
{model}
|
||||||
|
editHandler={() => {
|
||||||
|
goto(
|
||||||
|
`/workspace/models/edit?id=${encodeURIComponent(model.id)}`
|
||||||
|
);
|
||||||
|
}}
|
||||||
shareHandler={() => {
|
shareHandler={() => {
|
||||||
shareModelHandler(model);
|
shareModelHandler(model);
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
let loaded = false;
|
let loaded = false;
|
||||||
|
|
||||||
let filesInputElement = null;
|
let filesInputElement = null;
|
||||||
let inputFiles = [];
|
let inputFiles = null;
|
||||||
|
|
||||||
const uploadFileHandler = async (file, fullContext: boolean = false) => {
|
const uploadFileHandler = async (file, fullContext: boolean = false) => {
|
||||||
if ($user?.role !== 'admin' && !($user?.permissions?.chat?.file_upload ?? true)) {
|
if ($user?.role !== 'admin' && !($user?.permissions?.chat?.file_upload ?? true)) {
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
export let user;
|
export let user;
|
||||||
export let model;
|
export let model;
|
||||||
|
|
||||||
|
export let editHandler: Function;
|
||||||
export let shareHandler: Function;
|
export let shareHandler: Function;
|
||||||
export let cloneHandler: Function;
|
export let cloneHandler: Function;
|
||||||
export let exportHandler: Function;
|
export let exportHandler: Function;
|
||||||
|
|
@ -61,6 +62,16 @@
|
||||||
align="start"
|
align="start"
|
||||||
transition={flyAndScale}
|
transition={flyAndScale}
|
||||||
>
|
>
|
||||||
|
<DropdownMenu.Item
|
||||||
|
class="flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
||||||
|
on:click={() => {
|
||||||
|
editHandler();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Pencil />
|
||||||
|
<div class="flex items-center">{$i18n.t('Edit')}</div>
|
||||||
|
</DropdownMenu.Item>
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
class="flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
|
|
@ -113,6 +124,19 @@
|
||||||
</div>
|
</div>
|
||||||
</DropdownMenu.Item>
|
</DropdownMenu.Item>
|
||||||
|
|
||||||
|
<DropdownMenu.Item
|
||||||
|
class="flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
||||||
|
on:click={() => {
|
||||||
|
cloneHandler();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<DocumentDuplicate />
|
||||||
|
|
||||||
|
<div class="flex items-center">{$i18n.t('Clone')}</div>
|
||||||
|
</DropdownMenu.Item>
|
||||||
|
|
||||||
|
<hr class="border-gray-50 dark:border-gray-800 my-1" />
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
class="flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
|
|
@ -124,6 +148,17 @@
|
||||||
<div class="flex items-center">{$i18n.t('Copy Link')}</div>
|
<div class="flex items-center">{$i18n.t('Copy Link')}</div>
|
||||||
</DropdownMenu.Item>
|
</DropdownMenu.Item>
|
||||||
|
|
||||||
|
<DropdownMenu.Item
|
||||||
|
class="flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
||||||
|
on:click={() => {
|
||||||
|
exportHandler();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Download />
|
||||||
|
|
||||||
|
<div class="flex items-center">{$i18n.t('Export')}</div>
|
||||||
|
</DropdownMenu.Item>
|
||||||
|
|
||||||
{#if $config?.features.enable_community_sharing}
|
{#if $config?.features.enable_community_sharing}
|
||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
class="flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
||||||
|
|
@ -136,28 +171,6 @@
|
||||||
</DropdownMenu.Item>
|
</DropdownMenu.Item>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<DropdownMenu.Item
|
|
||||||
class="flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
|
||||||
on:click={() => {
|
|
||||||
cloneHandler();
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<DocumentDuplicate />
|
|
||||||
|
|
||||||
<div class="flex items-center">{$i18n.t('Clone')}</div>
|
|
||||||
</DropdownMenu.Item>
|
|
||||||
|
|
||||||
<DropdownMenu.Item
|
|
||||||
class="flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
|
||||||
on:click={() => {
|
|
||||||
exportHandler();
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Download />
|
|
||||||
|
|
||||||
<div class="flex items-center">{$i18n.t('Export')}</div>
|
|
||||||
</DropdownMenu.Item>
|
|
||||||
|
|
||||||
<hr class="border-gray-50 dark:border-gray-800 my-1" />
|
<hr class="border-gray-50 dark:border-gray-800 my-1" />
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue