mirror of
https://github.com/open-webui/open-webui.git
synced 2026-12-03 18:17:56 -05:00
refac
This commit is contained in:
1 parent
2eb77fc27f
commit
d786ed56c9
7 files changed
+14
-8
No files matched your search
@@ -1,4 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { getContext, onDestroy } from 'svelte';
|
||||
import {
|
||||
AVATAR_MAX_BYTES,
|
||||
@@ -39,7 +40,7 @@
|
||||
error = $i18n.t('Choose a VRMA file, up to 10 MiB.');
|
||||
return;
|
||||
}
|
||||
const id = crypto.randomUUID();
|
||||
const id = uuidv4();
|
||||
animationFiles = { ...animationFiles, [id]: selected };
|
||||
if (typeof animationTarget === 'number') {
|
||||
value = {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import WorkspaceAccessModal from './common/WorkspaceAccessModal.svelte';
|
||||
let accessModal: WorkspaceAccessModal;
|
||||
import { resolveLocalizedResource } from '$lib/utils/localizedContent';
|
||||
@@ -251,7 +252,7 @@
|
||||
|
||||
const cloneHandler = async (skill) => {
|
||||
try {
|
||||
const suffix = crypto.randomUUID().slice(0, 7);
|
||||
const suffix = uuidv4().slice(0, 7);
|
||||
const result = await cloneSkill(
|
||||
localStorage.token,
|
||||
skill.id,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { onMount, tick, getContext } from 'svelte';
|
||||
|
||||
import { toast } from 'svelte-sonner';
|
||||
@@ -204,7 +205,7 @@
|
||||
};
|
||||
const saveCopy = async () => {
|
||||
try {
|
||||
const suffix = crypto.randomUUID().slice(0, 7);
|
||||
const suffix = uuidv4().slice(0, 7);
|
||||
const result = await createNewSkill(localStorage.token, {
|
||||
id: `${id}-${suffix}`,
|
||||
name: `${name} (${suffix})`,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { onDestroy, getContext, tick, type Snippet } from 'svelte';
|
||||
import { toast } from 'svelte-sonner';
|
||||
import { createFocusTrap } from 'focus-trap';
|
||||
@@ -78,7 +79,7 @@
|
||||
let newName = '';
|
||||
let newNameInput: HTMLInputElement;
|
||||
let dialog = { show: false, title: '', input: false, value: '', action: (_: string) => {} };
|
||||
const dragType = `application/x-skill-file-${crypto.randomUUID()}`;
|
||||
const dragType = `application/x-skill-file-${uuidv4()}`;
|
||||
|
||||
const ask = (title: string, input: boolean, action: (value: string) => void, value = '') => {
|
||||
dialog = { show: true, title, input, value, action };
|
||||
|
||||
Reference in new issue
Block a user