Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
276b7b90
Commit
276b7b90
authored
May 26, 2024
by
Jun Siang Cheah
Browse files
Merge remote-tracking branch 'upstream/dev' into feat/backend-web-search
parents
b1265c9c
7b81271b
Changes
103
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
349 additions
and
304 deletions
+349
-304
src/lib/i18n/locales/ka-GE/translation.json
src/lib/i18n/locales/ka-GE/translation.json
+4
-3
src/lib/i18n/locales/ko-KR/translation.json
src/lib/i18n/locales/ko-KR/translation.json
+4
-3
src/lib/i18n/locales/nl-NL/translation.json
src/lib/i18n/locales/nl-NL/translation.json
+4
-3
src/lib/i18n/locales/pa-IN/translation.json
src/lib/i18n/locales/pa-IN/translation.json
+4
-3
src/lib/i18n/locales/pl-PL/translation.json
src/lib/i18n/locales/pl-PL/translation.json
+4
-3
src/lib/i18n/locales/pt-BR/translation.json
src/lib/i18n/locales/pt-BR/translation.json
+4
-3
src/lib/i18n/locales/pt-PT/translation.json
src/lib/i18n/locales/pt-PT/translation.json
+4
-3
src/lib/i18n/locales/ru-RU/translation.json
src/lib/i18n/locales/ru-RU/translation.json
+4
-3
src/lib/i18n/locales/sr-RS/translation.json
src/lib/i18n/locales/sr-RS/translation.json
+4
-3
src/lib/i18n/locales/sv-SE/translation.json
src/lib/i18n/locales/sv-SE/translation.json
+4
-3
src/lib/i18n/locales/tr-TR/translation.json
src/lib/i18n/locales/tr-TR/translation.json
+4
-3
src/lib/i18n/locales/uk-UA/translation.json
src/lib/i18n/locales/uk-UA/translation.json
+4
-3
src/lib/i18n/locales/vi-VN/translation.json
src/lib/i18n/locales/vi-VN/translation.json
+4
-3
src/lib/i18n/locales/zh-CN/translation.json
src/lib/i18n/locales/zh-CN/translation.json
+4
-3
src/lib/i18n/locales/zh-TW/translation.json
src/lib/i18n/locales/zh-TW/translation.json
+4
-3
src/lib/stores/index.ts
src/lib/stores/index.ts
+2
-2
src/lib/utils/index.ts
src/lib/utils/index.ts
+2
-1
src/routes/(app)/admin/+layout.svelte
src/routes/(app)/admin/+layout.svelte
+78
-0
src/routes/(app)/admin/+page.svelte
src/routes/(app)/admin/+page.svelte
+204
-251
src/routes/(app)/workspace/models/create/+page.svelte
src/routes/(app)/workspace/models/create/+page.svelte
+3
-5
No files found.
src/lib/i18n/locales/ka-GE/translation.json
View file @
276b7b90
...
...
@@ -48,6 +48,7 @@
"API keys"
:
"API გასაღები"
,
"April"
:
"აპრილი"
,
"Archive"
:
"არქივი"
,
"Archive All Chats"
:
""
,
"Archived Chats"
:
"ჩატის ისტორიის არქივი"
,
"are allowed - Activate this command by typing"
:
"დაშვებულია - ბრძანების გასააქტიურებლად აკრიფეთ:"
,
"Are you sure?"
:
"დარწმუნებული ხარ?"
,
...
...
@@ -120,7 +121,6 @@
"Custom"
:
"საკუთარი"
,
"Customize models for a specific purpose"
:
""
,
"Dark"
:
"მუქი"
,
"Dashboard"
:
"პანელი"
,
"Database"
:
"მონაცემთა ბაზა"
,
"December"
:
"დეკემბერი"
,
"Default"
:
"დეფოლტი"
,
...
...
@@ -133,9 +133,9 @@
"delete"
:
"წაშლა"
,
"Delete"
:
"წაშლა"
,
"Delete a model"
:
"მოდელის წაშლა"
,
"Delete All Chats"
:
""
,
"Delete chat"
:
"შეტყობინების წაშლა"
,
"Delete Chat"
:
"შეტყობინების წაშლა"
,
"Delete Chats"
:
"შეტყობინებების წაშლა"
,
"delete this link"
:
"ბმულის წაშლა"
,
"Delete User"
:
"მომხმარებლის წაშლა"
,
"Deleted {{deleteModelTag}}"
:
"{{deleteModelTag}} წაშლილია"
,
...
...
@@ -314,7 +314,6 @@
"OpenAI URL/Key required."
:
"OpenAI URL/Key აუცილებელია"
,
"or"
:
"ან"
,
"Other"
:
"სხვა"
,
"Overview"
:
"ოვერვიუ"
,
"Password"
:
"პაროლი"
,
"PDF document (.pdf)"
:
"PDF დოკუმენტი (.pdf)"
,
"PDF Extract Images (OCR)"
:
"PDF იდან ამოღებული სურათები (OCR)"
,
...
...
@@ -365,7 +364,9 @@
"Scan for documents from {{path}}"
:
"დოკუმენტების სკანირება {{ path}}-დან"
,
"Search"
:
"ძიება"
,
"Search a model"
:
"მოდელის ძიება"
,
"Search Chats"
:
""
,
"Search Documents"
:
"დოკუმენტების ძიება"
,
"Search Models"
:
""
,
"Search Prompts"
:
"მოთხოვნების ძიება"
,
"Search Results"
:
""
,
"Searching the web for '{{searchQuery}}'"
:
""
,
...
...
src/lib/i18n/locales/ko-KR/translation.json
View file @
276b7b90
...
...
@@ -48,6 +48,7 @@
"API keys"
:
"API 키"
,
"April"
:
"4월"
,
"Archive"
:
"아카이브"
,
"Archive All Chats"
:
""
,
"Archived Chats"
:
"채팅 기록 아카이브"
,
"are allowed - Activate this command by typing"
:
"허용됩니다 - 이 명령을 활성화하려면 입력하세요."
,
"Are you sure?"
:
"확실합니까?"
,
...
...
@@ -120,7 +121,6 @@
"Custom"
:
"사용자 정의"
,
"Customize models for a specific purpose"
:
""
,
"Dark"
:
"어두운"
,
"Dashboard"
:
"대시보드"
,
"Database"
:
"데이터베이스"
,
"December"
:
"12월"
,
"Default"
:
"기본값"
,
...
...
@@ -133,9 +133,9 @@
"delete"
:
"삭제"
,
"Delete"
:
"삭제"
,
"Delete a model"
:
"모델 삭제"
,
"Delete All Chats"
:
""
,
"Delete chat"
:
"채팅 삭제"
,
"Delete Chat"
:
"채팅 삭제"
,
"Delete Chats"
:
"채팅들 삭제"
,
"delete this link"
:
"이 링크를 삭제합니다."
,
"Delete User"
:
"사용자 삭제"
,
"Deleted {{deleteModelTag}}"
:
"{{deleteModelTag}} 삭제됨"
,
...
...
@@ -314,7 +314,6 @@
"OpenAI URL/Key required."
:
"OpenAI URL/Key가 필요합니다."
,
"or"
:
"또는"
,
"Other"
:
"기타"
,
"Overview"
:
"개요"
,
"Password"
:
"비밀번호"
,
"PDF document (.pdf)"
:
"PDF 문서 (.pdf)"
,
"PDF Extract Images (OCR)"
:
"PDF에서 이미지 추출 (OCR)"
,
...
...
@@ -365,7 +364,9 @@
"Scan for documents from {{path}}"
:
"{{path}}에서 문서 스캔"
,
"Search"
:
"검색"
,
"Search a model"
:
"모델 검색"
,
"Search Chats"
:
""
,
"Search Documents"
:
"문서 검색"
,
"Search Models"
:
""
,
"Search Prompts"
:
"프롬프트 검색"
,
"Search Results"
:
""
,
"Searching the web for '{{searchQuery}}'"
:
""
,
...
...
src/lib/i18n/locales/nl-NL/translation.json
View file @
276b7b90
...
...
@@ -48,6 +48,7 @@
"API keys"
:
"API keys"
,
"April"
:
"April"
,
"Archive"
:
"Archief"
,
"Archive All Chats"
:
""
,
"Archived Chats"
:
"chatrecord"
,
"are allowed - Activate this command by typing"
:
"zijn toegestaan - Activeer deze commando door te typen"
,
"Are you sure?"
:
"Zeker weten?"
,
...
...
@@ -120,7 +121,6 @@
"Custom"
:
"Aangepast"
,
"Customize models for a specific purpose"
:
""
,
"Dark"
:
"Donker"
,
"Dashboard"
:
"Dashboard"
,
"Database"
:
"Database"
,
"December"
:
"December"
,
"Default"
:
"Standaard"
,
...
...
@@ -133,9 +133,9 @@
"delete"
:
"verwijderen"
,
"Delete"
:
"Verwijderen"
,
"Delete a model"
:
"Verwijder een model"
,
"Delete All Chats"
:
""
,
"Delete chat"
:
"Verwijder chat"
,
"Delete Chat"
:
"Verwijder Chat"
,
"Delete Chats"
:
"Verwijder Chats"
,
"delete this link"
:
"verwijder deze link"
,
"Delete User"
:
"Verwijder Gebruiker"
,
"Deleted {{deleteModelTag}}"
:
"{{deleteModelTag}} is verwijderd"
,
...
...
@@ -314,7 +314,6 @@
"OpenAI URL/Key required."
:
"OpenAI URL/Sleutel vereist."
,
"or"
:
"of"
,
"Other"
:
"Andere"
,
"Overview"
:
"Overzicht"
,
"Password"
:
"Wachtwoord"
,
"PDF document (.pdf)"
:
"PDF document (.pdf)"
,
"PDF Extract Images (OCR)"
:
"PDF Extract Afbeeldingen (OCR)"
,
...
...
@@ -365,7 +364,9 @@
"Scan for documents from {{path}}"
:
"Scan voor documenten van {{path}}"
,
"Search"
:
"Zoeken"
,
"Search a model"
:
"Zoek een model"
,
"Search Chats"
:
""
,
"Search Documents"
:
"Zoek Documenten"
,
"Search Models"
:
""
,
"Search Prompts"
:
"Zoek Prompts"
,
"Search Results"
:
""
,
"Searching the web for '{{searchQuery}}'"
:
""
,
...
...
src/lib/i18n/locales/pa-IN/translation.json
View file @
276b7b90
...
...
@@ -48,6 +48,7 @@
"API keys"
:
"API ਕੁੰਜੀਆਂ"
,
"April"
:
"ਅਪ੍ਰੈਲ"
,
"Archive"
:
"ਆਰਕਾਈਵ"
,
"Archive All Chats"
:
""
,
"Archived Chats"
:
"ਆਰਕਾਈਵ ਕੀਤੀਆਂ ਗੱਲਾਂ"
,
"are allowed - Activate this command by typing"
:
"ਅਨੁਮਤ ਹਨ - ਇਸ ਕਮਾਂਡ ਨੂੰ ਟਾਈਪ ਕਰਕੇ ਸਰਗਰਮ ਕਰੋ"
,
"Are you sure?"
:
"ਕੀ ਤੁਸੀਂ ਯਕੀਨਨ ਹੋ?"
,
...
...
@@ -120,7 +121,6 @@
"Custom"
:
"ਕਸਟਮ"
,
"Customize models for a specific purpose"
:
""
,
"Dark"
:
"ਗੂੜ੍ਹਾ"
,
"Dashboard"
:
"ਡੈਸ਼ਬੋਰਡ"
,
"Database"
:
"ਡਾਟਾਬੇਸ"
,
"December"
:
"ਦਸੰਬਰ"
,
"Default"
:
"ਮੂਲ"
,
...
...
@@ -133,9 +133,9 @@
"delete"
:
"ਮਿਟਾਓ"
,
"Delete"
:
"ਮਿਟਾਓ"
,
"Delete a model"
:
"ਇੱਕ ਮਾਡਲ ਮਿਟਾਓ"
,
"Delete All Chats"
:
""
,
"Delete chat"
:
"ਗੱਲਬਾਤ ਮਿਟਾਓ"
,
"Delete Chat"
:
"ਗੱਲਬਾਤ ਮਿਟਾਓ"
,
"Delete Chats"
:
"ਗੱਲਾਂ ਮਿਟਾਓ"
,
"delete this link"
:
"ਇਸ ਲਿੰਕ ਨੂੰ ਮਿਟਾਓ"
,
"Delete User"
:
"ਉਪਭੋਗਤਾ ਮਿਟਾਓ"
,
"Deleted {{deleteModelTag}}"
:
"{{deleteModelTag}} ਮਿਟਾਇਆ ਗਿਆ"
,
...
...
@@ -314,7 +314,6 @@
"OpenAI URL/Key required."
:
"ਓਪਨਏਆਈ URL/ਕੁੰਜੀ ਦੀ ਲੋੜ ਹੈ।"
,
"or"
:
"ਜਾਂ"
,
"Other"
:
"ਹੋਰ"
,
"Overview"
:
"ਸੰਖੇਪ"
,
"Password"
:
"ਪਾਸਵਰਡ"
,
"PDF document (.pdf)"
:
"PDF ਡਾਕੂਮੈਂਟ (.pdf)"
,
"PDF Extract Images (OCR)"
:
"PDF ਚਿੱਤਰ ਕੱਢੋ (OCR)"
,
...
...
@@ -365,7 +364,9 @@
"Scan for documents from {{path}}"
:
"{{path}} ਤੋਂ ਡਾਕੂਮੈਂਟਾਂ ਲਈ ਸਕੈਨ ਕਰੋ"
,
"Search"
:
"ਖੋਜ"
,
"Search a model"
:
"ਇੱਕ ਮਾਡਲ ਖੋਜੋ"
,
"Search Chats"
:
""
,
"Search Documents"
:
"ਡਾਕੂਮੈਂਟ ਖੋਜੋ"
,
"Search Models"
:
""
,
"Search Prompts"
:
"ਪ੍ਰੰਪਟ ਖੋਜੋ"
,
"Search Results"
:
""
,
"Searching the web for '{{searchQuery}}'"
:
""
,
...
...
src/lib/i18n/locales/pl-PL/translation.json
View file @
276b7b90
...
...
@@ -48,6 +48,7 @@
"API keys"
:
"Klucze API"
,
"April"
:
"Kwiecień"
,
"Archive"
:
"Archiwum"
,
"Archive All Chats"
:
""
,
"Archived Chats"
:
"Zarchiwizowane czaty"
,
"are allowed - Activate this command by typing"
:
"są dozwolone - Aktywuj to polecenie, wpisując"
,
"Are you sure?"
:
"Jesteś pewien?"
,
...
...
@@ -120,7 +121,6 @@
"Custom"
:
"Niestandardowy"
,
"Customize models for a specific purpose"
:
""
,
"Dark"
:
"Ciemny"
,
"Dashboard"
:
"Dashboard"
,
"Database"
:
"Baza danych"
,
"December"
:
"Grudzień"
,
"Default"
:
"Domyślny"
,
...
...
@@ -133,9 +133,9 @@
"delete"
:
"usuń"
,
"Delete"
:
"Usuń"
,
"Delete a model"
:
"Usuń model"
,
"Delete All Chats"
:
""
,
"Delete chat"
:
"Usuń czat"
,
"Delete Chat"
:
"Usuń czat"
,
"Delete Chats"
:
"Usuń czaty"
,
"delete this link"
:
"usuń ten link"
,
"Delete User"
:
"Usuń użytkownika"
,
"Deleted {{deleteModelTag}}"
:
"Usunięto {{deleteModelTag}}"
,
...
...
@@ -314,7 +314,6 @@
"OpenAI URL/Key required."
:
"URL/Klucz OpenAI jest wymagany."
,
"or"
:
"lub"
,
"Other"
:
"Inne"
,
"Overview"
:
"Przegląd"
,
"Password"
:
"Hasło"
,
"PDF document (.pdf)"
:
"Dokument PDF (.pdf)"
,
"PDF Extract Images (OCR)"
:
"PDF Wyodrębnij obrazy (OCR)"
,
...
...
@@ -365,7 +364,9 @@
"Scan for documents from {{path}}"
:
"Skanuj dokumenty z {{path}}"
,
"Search"
:
"Szukaj"
,
"Search a model"
:
"Szukaj modelu"
,
"Search Chats"
:
""
,
"Search Documents"
:
"Szukaj dokumentów"
,
"Search Models"
:
""
,
"Search Prompts"
:
"Szukaj promptów"
,
"Search Results"
:
""
,
"Searching the web for '{{searchQuery}}'"
:
""
,
...
...
src/lib/i18n/locales/pt-BR/translation.json
View file @
276b7b90
...
...
@@ -48,6 +48,7 @@
"API keys"
:
"Chaves da API"
,
"April"
:
"Abril"
,
"Archive"
:
"Arquivo"
,
"Archive All Chats"
:
""
,
"Archived Chats"
:
"Bate-papos arquivados"
,
"are allowed - Activate this command by typing"
:
"são permitidos - Ative este comando digitando"
,
"Are you sure?"
:
"Tem certeza?"
,
...
...
@@ -120,7 +121,6 @@
"Custom"
:
"Personalizado"
,
"Customize models for a specific purpose"
:
""
,
"Dark"
:
"Escuro"
,
"Dashboard"
:
"Painel"
,
"Database"
:
"Banco de dados"
,
"December"
:
"Dezembro"
,
"Default"
:
"Padrão"
,
...
...
@@ -133,9 +133,9 @@
"delete"
:
"excluir"
,
"Delete"
:
"Excluir"
,
"Delete a model"
:
"Excluir um modelo"
,
"Delete All Chats"
:
""
,
"Delete chat"
:
"Excluir bate-papo"
,
"Delete Chat"
:
"Excluir Bate-papo"
,
"Delete Chats"
:
"Excluir Bate-papos"
,
"delete this link"
:
"excluir este link"
,
"Delete User"
:
"Excluir Usuário"
,
"Deleted {{deleteModelTag}}"
:
"{{deleteModelTag}} excluído"
,
...
...
@@ -314,7 +314,6 @@
"OpenAI URL/Key required."
:
"URL/Chave da API OpenAI é necessária."
,
"or"
:
"ou"
,
"Other"
:
"Outro"
,
"Overview"
:
"Visão Geral"
,
"Password"
:
"Senha"
,
"PDF document (.pdf)"
:
"Documento PDF (.pdf)"
,
"PDF Extract Images (OCR)"
:
"Extrair Imagens de PDF (OCR)"
,
...
...
@@ -365,7 +364,9 @@
"Scan for documents from {{path}}"
:
"Digitalizar documentos de {{path}}"
,
"Search"
:
"Pesquisar"
,
"Search a model"
:
"Pesquisar um modelo"
,
"Search Chats"
:
""
,
"Search Documents"
:
"Pesquisar Documentos"
,
"Search Models"
:
""
,
"Search Prompts"
:
"Pesquisar Prompts"
,
"Search Results"
:
""
,
"Searching the web for '{{searchQuery}}'"
:
""
,
...
...
src/lib/i18n/locales/pt-PT/translation.json
View file @
276b7b90
...
...
@@ -48,6 +48,7 @@
"API keys"
:
"Chaves da API"
,
"April"
:
"Abril"
,
"Archive"
:
"Arquivo"
,
"Archive All Chats"
:
""
,
"Archived Chats"
:
"Bate-papos arquivados"
,
"are allowed - Activate this command by typing"
:
"são permitidos - Ative este comando digitando"
,
"Are you sure?"
:
"Tem certeza?"
,
...
...
@@ -120,7 +121,6 @@
"Custom"
:
"Personalizado"
,
"Customize models for a specific purpose"
:
""
,
"Dark"
:
"Escuro"
,
"Dashboard"
:
"Painel"
,
"Database"
:
"Banco de dados"
,
"December"
:
"Dezembro"
,
"Default"
:
"Padrão"
,
...
...
@@ -133,9 +133,9 @@
"delete"
:
"excluir"
,
"Delete"
:
"Excluir"
,
"Delete a model"
:
"Excluir um modelo"
,
"Delete All Chats"
:
""
,
"Delete chat"
:
"Excluir bate-papo"
,
"Delete Chat"
:
"Excluir Bate-papo"
,
"Delete Chats"
:
"Excluir Bate-papos"
,
"delete this link"
:
"excluir este link"
,
"Delete User"
:
"Excluir Usuário"
,
"Deleted {{deleteModelTag}}"
:
"{{deleteModelTag}} excluído"
,
...
...
@@ -314,7 +314,6 @@
"OpenAI URL/Key required."
:
"URL/Chave da API OpenAI é necessária."
,
"or"
:
"ou"
,
"Other"
:
"Outro"
,
"Overview"
:
"Visão Geral"
,
"Password"
:
"Senha"
,
"PDF document (.pdf)"
:
"Documento PDF (.pdf)"
,
"PDF Extract Images (OCR)"
:
"Extrair Imagens de PDF (OCR)"
,
...
...
@@ -365,7 +364,9 @@
"Scan for documents from {{path}}"
:
"Digitalizar documentos de {{path}}"
,
"Search"
:
"Pesquisar"
,
"Search a model"
:
"Pesquisar um modelo"
,
"Search Chats"
:
""
,
"Search Documents"
:
"Pesquisar Documentos"
,
"Search Models"
:
""
,
"Search Prompts"
:
"Pesquisar Prompts"
,
"Search Results"
:
""
,
"Searching the web for '{{searchQuery}}'"
:
""
,
...
...
src/lib/i18n/locales/ru-RU/translation.json
View file @
276b7b90
...
...
@@ -48,6 +48,7 @@
"API keys"
:
"Ключи API"
,
"April"
:
"Апрель"
,
"Archive"
:
"Архив"
,
"Archive All Chats"
:
""
,
"Archived Chats"
:
"запис на чат"
,
"are allowed - Activate this command by typing"
:
"разрешено - активируйте эту команду вводом"
,
"Are you sure?"
:
"Вы уверены?"
,
...
...
@@ -120,7 +121,6 @@
"Custom"
:
"Пользовательский"
,
"Customize models for a specific purpose"
:
""
,
"Dark"
:
"Тёмный"
,
"Dashboard"
:
"Панель управления"
,
"Database"
:
"База данных"
,
"December"
:
"Декабрь"
,
"Default"
:
"По умолчанию"
,
...
...
@@ -133,9 +133,9 @@
"delete"
:
"удалить"
,
"Delete"
:
"Удалить"
,
"Delete a model"
:
"Удалить модель"
,
"Delete All Chats"
:
""
,
"Delete chat"
:
"Удалить чат"
,
"Delete Chat"
:
"Удалить чат"
,
"Delete Chats"
:
"Удалить чаты"
,
"delete this link"
:
"удалить эту ссылку"
,
"Delete User"
:
"Удалить пользователя"
,
"Deleted {{deleteModelTag}}"
:
"Удалено {{deleteModelTag}}"
,
...
...
@@ -314,7 +314,6 @@
"OpenAI URL/Key required."
:
"Требуется URL-адрес API OpenAI или ключ API."
,
"or"
:
"или"
,
"Other"
:
"Прочее"
,
"Overview"
:
"Обзор"
,
"Password"
:
"Пароль"
,
"PDF document (.pdf)"
:
"PDF-документ (.pdf)"
,
"PDF Extract Images (OCR)"
:
"Извлечение изображений из PDF (OCR)"
,
...
...
@@ -365,7 +364,9 @@
"Scan for documents from {{path}}"
:
"Сканирование документов из {{path}}"
,
"Search"
:
"Поиск"
,
"Search a model"
:
"Поиск модели"
,
"Search Chats"
:
""
,
"Search Documents"
:
"Поиск документов"
,
"Search Models"
:
""
,
"Search Prompts"
:
"Поиск промтов"
,
"Search Results"
:
""
,
"Searching the web for '{{searchQuery}}'"
:
""
,
...
...
src/lib/i18n/locales/sr-RS/translation.json
View file @
276b7b90
...
...
@@ -48,6 +48,7 @@
"API keys"
:
"API кључеви"
,
"April"
:
"Април"
,
"Archive"
:
"Архива"
,
"Archive All Chats"
:
""
,
"Archived Chats"
:
"Архивирана ћаскања"
,
"are allowed - Activate this command by typing"
:
"су дозвољени - Покрените ову наредбу уношењем"
,
"Are you sure?"
:
"Да ли сте сигурни?"
,
...
...
@@ -120,7 +121,6 @@
"Custom"
:
"Прилагођено"
,
"Customize models for a specific purpose"
:
""
,
"Dark"
:
"Тамна"
,
"Dashboard"
:
"Контролна табла"
,
"Database"
:
"База података"
,
"December"
:
"Децембар"
,
"Default"
:
"Подразумевано"
,
...
...
@@ -133,9 +133,9 @@
"delete"
:
"обриши"
,
"Delete"
:
"Обриши"
,
"Delete a model"
:
"Обриши модел"
,
"Delete All Chats"
:
""
,
"Delete chat"
:
"Обриши ћаскање"
,
"Delete Chat"
:
"Обриши ћаскање"
,
"Delete Chats"
:
"Обриши ћаскања"
,
"delete this link"
:
"обриши ову везу"
,
"Delete User"
:
"Обриши корисника"
,
"Deleted {{deleteModelTag}}"
:
"Обрисано {{deleteModelTag}}"
,
...
...
@@ -314,7 +314,6 @@
"OpenAI URL/Key required."
:
"Потребан је OpenAI URL/кључ."
,
"or"
:
"или"
,
"Other"
:
"Остало"
,
"Overview"
:
"Преглед"
,
"Password"
:
"Лозинка"
,
"PDF document (.pdf)"
:
"PDF документ (.pdf)"
,
"PDF Extract Images (OCR)"
:
"Извлачење PDF слика (OCR)"
,
...
...
@@ -365,7 +364,9 @@
"Scan for documents from {{path}}"
:
"Скенирај документе из {{path}}"
,
"Search"
:
"Претражи"
,
"Search a model"
:
"Претражи модел"
,
"Search Chats"
:
""
,
"Search Documents"
:
"Претражи документе"
,
"Search Models"
:
""
,
"Search Prompts"
:
"Претражи упите"
,
"Search Results"
:
""
,
"Searching the web for '{{searchQuery}}'"
:
""
,
...
...
src/lib/i18n/locales/sv-SE/translation.json
View file @
276b7b90
...
...
@@ -48,6 +48,7 @@
"API keys"
:
"API-nycklar"
,
"April"
:
"April"
,
"Archive"
:
"Arkiv"
,
"Archive All Chats"
:
""
,
"Archived Chats"
:
"Arkiverade chattar"
,
"are allowed - Activate this command by typing"
:
"är tillåtna - Aktivera detta kommando genom att skriva"
,
"Are you sure?"
:
"Är du säker?"
,
...
...
@@ -120,7 +121,6 @@
"Custom"
:
"Anpassad"
,
"Customize models for a specific purpose"
:
""
,
"Dark"
:
"Mörk"
,
"Dashboard"
:
"Instrumentbräda"
,
"Database"
:
"Databas"
,
"December"
:
"December"
,
"Default"
:
"Standard"
,
...
...
@@ -133,9 +133,9 @@
"delete"
:
"radera"
,
"Delete"
:
"Radera"
,
"Delete a model"
:
"Ta bort en modell"
,
"Delete All Chats"
:
""
,
"Delete chat"
:
"Radera chatt"
,
"Delete Chat"
:
"Radera chatt"
,
"Delete Chats"
:
"Radera chattar"
,
"delete this link"
:
"radera denna länk"
,
"Delete User"
:
"Radera användare"
,
"Deleted {{deleteModelTag}}"
:
"Raderad {{deleteModelTag}}"
,
...
...
@@ -314,7 +314,6 @@
"OpenAI URL/Key required."
:
"OpenAI-URL/nyckel krävs."
,
"or"
:
"eller"
,
"Other"
:
"Andra"
,
"Overview"
:
"Översikt"
,
"Password"
:
"Lösenord"
,
"PDF document (.pdf)"
:
"PDF-dokument (.pdf)"
,
"PDF Extract Images (OCR)"
:
"PDF Extrahera bilder (OCR)"
,
...
...
@@ -365,7 +364,9 @@
"Scan for documents from {{path}}"
:
"Skanna efter dokument från {{path}}"
,
"Search"
:
"Sök"
,
"Search a model"
:
"Sök efter en modell"
,
"Search Chats"
:
""
,
"Search Documents"
:
"Sök dokument"
,
"Search Models"
:
""
,
"Search Prompts"
:
"Sök promptar"
,
"Search Results"
:
""
,
"Searching the web for '{{searchQuery}}'"
:
""
,
...
...
src/lib/i18n/locales/tr-TR/translation.json
View file @
276b7b90
...
...
@@ -48,6 +48,7 @@
"API keys"
:
"API anahtarları"
,
"April"
:
"Nisan"
,
"Archive"
:
"Arşiv"
,
"Archive All Chats"
:
""
,
"Archived Chats"
:
"Arşivlenmiş Sohbetler"
,
"are allowed - Activate this command by typing"
:
"izin verilir - Bu komutu yazarak etkinleştirin"
,
"Are you sure?"
:
"Emin misiniz?"
,
...
...
@@ -120,7 +121,6 @@
"Custom"
:
"Özel"
,
"Customize models for a specific purpose"
:
""
,
"Dark"
:
"Koyu"
,
"Dashboard"
:
"Panel"
,
"Database"
:
"Veritabanı"
,
"December"
:
"Aralık"
,
"Default"
:
"Varsayılan"
,
...
...
@@ -133,9 +133,9 @@
"delete"
:
"sil"
,
"Delete"
:
"Sil"
,
"Delete a model"
:
"Bir modeli sil"
,
"Delete All Chats"
:
""
,
"Delete chat"
:
"Sohbeti sil"
,
"Delete Chat"
:
"Sohbeti Sil"
,
"Delete Chats"
:
"Sohbetleri Sil"
,
"delete this link"
:
"bu bağlantıyı sil"
,
"Delete User"
:
"Kullanıcıyı Sil"
,
"Deleted {{deleteModelTag}}"
:
"{{deleteModelTag}} silindi"
,
...
...
@@ -314,7 +314,6 @@
"OpenAI URL/Key required."
:
"OpenAI URL/Anahtar gereklidir."
,
"or"
:
"veya"
,
"Other"
:
"Diğer"
,
"Overview"
:
"Genel Bakış"
,
"Password"
:
"Parola"
,
"PDF document (.pdf)"
:
"PDF belgesi (.pdf)"
,
"PDF Extract Images (OCR)"
:
"PDF Görüntülerini Çıkart (OCR)"
,
...
...
@@ -365,7 +364,9 @@
"Scan for documents from {{path}}"
:
"{{path}} dizininden belgeleri tarayın"
,
"Search"
:
"Ara"
,
"Search a model"
:
"Bir model ara"
,
"Search Chats"
:
""
,
"Search Documents"
:
"Belgeleri Ara"
,
"Search Models"
:
""
,
"Search Prompts"
:
"Prompt Ara"
,
"Search Results"
:
""
,
"Searching the web for '{{searchQuery}}'"
:
""
,
...
...
src/lib/i18n/locales/uk-UA/translation.json
View file @
276b7b90
...
...
@@ -48,6 +48,7 @@
"API keys"
:
"Ключі API"
,
"April"
:
"Квітень"
,
"Archive"
:
"Архів"
,
"Archive All Chats"
:
""
,
"Archived Chats"
:
"Архівовані чати"
,
"are allowed - Activate this command by typing"
:
"дозволено - активізуйте цю команду набором"
,
"Are you sure?"
:
"Ви впевнені?"
,
...
...
@@ -120,7 +121,6 @@
"Custom"
:
"Налаштувати"
,
"Customize models for a specific purpose"
:
""
,
"Dark"
:
"Темна"
,
"Dashboard"
:
"Панель управління"
,
"Database"
:
"База даних"
,
"December"
:
"Грудень"
,
"Default"
:
"За замовчуванням"
,
...
...
@@ -133,9 +133,9 @@
"delete"
:
"видалити"
,
"Delete"
:
"Видалити"
,
"Delete a model"
:
"Видалити модель"
,
"Delete All Chats"
:
""
,
"Delete chat"
:
"Видалити чат"
,
"Delete Chat"
:
"Видалити чат"
,
"Delete Chats"
:
"Видалити чати"
,
"delete this link"
:
"видалити це посилання"
,
"Delete User"
:
"Видалити користувача"
,
"Deleted {{deleteModelTag}}"
:
"Видалено {{deleteModelTag}}"
,
...
...
@@ -314,7 +314,6 @@
"OpenAI URL/Key required."
:
"Потрібен OpenAI URL/ключ."
,
"or"
:
"або"
,
"Other"
:
"Інше"
,
"Overview"
:
"Огляд"
,
"Password"
:
"Пароль"
,
"PDF document (.pdf)"
:
"PDF документ (.pdf)"
,
"PDF Extract Images (OCR)"
:
"Розпізнавання зображень з PDF (OCR)"
,
...
...
@@ -365,7 +364,9 @@
"Scan for documents from {{path}}"
:
"Сканування документів з {{path}}"
,
"Search"
:
"Пошук"
,
"Search a model"
:
"Шукати модель"
,
"Search Chats"
:
""
,
"Search Documents"
:
"Пошук документів"
,
"Search Models"
:
""
,
"Search Prompts"
:
"Пошук промтів"
,
"Search Results"
:
""
,
"Searching the web for '{{searchQuery}}'"
:
""
,
...
...
src/lib/i18n/locales/vi-VN/translation.json
View file @
276b7b90
...
...
@@ -48,6 +48,7 @@
"API keys"
:
"API Keys"
,
"April"
:
"Tháng 4"
,
"Archive"
:
"Lưu trữ"
,
"Archive All Chats"
:
""
,
"Archived Chats"
:
"bản ghi trò chuyện"
,
"are allowed - Activate this command by typing"
:
"được phép - Kích hoạt lệnh này bằng cách gõ"
,
"Are you sure?"
:
"Bạn có chắc chắn không?"
,
...
...
@@ -120,7 +121,6 @@
"Custom"
:
"Tùy chỉnh"
,
"Customize models for a specific purpose"
:
""
,
"Dark"
:
"Tối"
,
"Dashboard"
:
"Trang tổng quan"
,
"Database"
:
"Cơ sở dữ liệu"
,
"December"
:
"Tháng 12"
,
"Default"
:
"Mặc định"
,
...
...
@@ -133,9 +133,9 @@
"delete"
:
"xóa"
,
"Delete"
:
"Xóa"
,
"Delete a model"
:
"Xóa mô hình"
,
"Delete All Chats"
:
""
,
"Delete chat"
:
"Xóa nội dung chat"
,
"Delete Chat"
:
"Xóa chat"
,
"Delete Chats"
:
"Xóa nội dung chat"
,
"delete this link"
:
"Xóa link này"
,
"Delete User"
:
"Xóa người dùng"
,
"Deleted {{deleteModelTag}}"
:
"Đã xóa {{deleteModelTag}}"
,
...
...
@@ -314,7 +314,6 @@
"OpenAI URL/Key required."
:
"Yêu cầu URL/Key API OpenAI."
,
"or"
:
"hoặc"
,
"Other"
:
"Khác"
,
"Overview"
:
"Tổng quan"
,
"Password"
:
"Mật khẩu"
,
"PDF document (.pdf)"
:
"Tập tin PDF (.pdf)"
,
"PDF Extract Images (OCR)"
:
"Trích xuất ảnh từ PDF (OCR)"
,
...
...
@@ -365,7 +364,9 @@
"Scan for documents from {{path}}"
:
"Quét tài liệu từ đường dẫn: {{path}}"
,
"Search"
:
"Tìm kiếm"
,
"Search a model"
:
"Tìm model"
,
"Search Chats"
:
""
,
"Search Documents"
:
"Tìm tài liệu"
,
"Search Models"
:
""
,
"Search Prompts"
:
"Tìm prompt"
,
"Search Results"
:
""
,
"Searching the web for '{{searchQuery}}'"
:
""
,
...
...
src/lib/i18n/locales/zh-CN/translation.json
View file @
276b7b90
...
...
@@ -48,6 +48,7 @@
"API keys"
:
"API 密钥"
,
"April"
:
"四月"
,
"Archive"
:
"存档"
,
"Archive All Chats"
:
""
,
"Archived Chats"
:
"聊天记录存档"
,
"are allowed - Activate this command by typing"
:
"允许 - 通过输入来激活这个命令"
,
"Are you sure?"
:
"你确定吗?"
,
...
...
@@ -120,7 +121,6 @@
"Custom"
:
"自定义"
,
"Customize models for a specific purpose"
:
""
,
"Dark"
:
"暗色"
,
"Dashboard"
:
"仪表盘"
,
"Database"
:
"数据库"
,
"December"
:
"十二月"
,
"Default"
:
"默认"
,
...
...
@@ -133,9 +133,9 @@
"delete"
:
"删除"
,
"Delete"
:
"删除"
,
"Delete a model"
:
"删除一个模型"
,
"Delete All Chats"
:
""
,
"Delete chat"
:
"删除聊天"
,
"Delete Chat"
:
"删除聊天"
,
"Delete Chats"
:
"删除聊天记录"
,
"delete this link"
:
"删除这个链接"
,
"Delete User"
:
"删除用户"
,
"Deleted {{deleteModelTag}}"
:
"已删除{{deleteModelTag}}"
,
...
...
@@ -314,7 +314,6 @@
"OpenAI URL/Key required."
:
"需要 OpenAI URL/Key"
,
"or"
:
"或"
,
"Other"
:
"其他"
,
"Overview"
:
"概述"
,
"Password"
:
"密码"
,
"PDF document (.pdf)"
:
"PDF 文档 (.pdf)"
,
"PDF Extract Images (OCR)"
:
"PDF 图像处理 (使用 OCR)"
,
...
...
@@ -365,7 +364,9 @@
"Scan for documents from {{path}}"
:
"从 {{path}} 扫描文档"
,
"Search"
:
"搜索"
,
"Search a model"
:
"搜索模型"
,
"Search Chats"
:
""
,
"Search Documents"
:
"搜索文档"
,
"Search Models"
:
""
,
"Search Prompts"
:
"搜索提示词"
,
"Search Results"
:
""
,
"Searching the web for '{{searchQuery}}'"
:
""
,
...
...
src/lib/i18n/locales/zh-TW/translation.json
View file @
276b7b90
...
...
@@ -48,6 +48,7 @@
"API keys"
:
"API Keys"
,
"April"
:
"4月"
,
"Archive"
:
"存檔"
,
"Archive All Chats"
:
""
,
"Archived Chats"
:
"聊天記錄存檔"
,
"are allowed - Activate this command by typing"
:
"是允許的 - 透過輸入"
,
"Are you sure?"
:
"你確定嗎?"
,
...
...
@@ -120,7 +121,6 @@
"Custom"
:
"自訂"
,
"Customize models for a specific purpose"
:
""
,
"Dark"
:
"暗色"
,
"Dashboard"
:
"儀表板"
,
"Database"
:
"資料庫"
,
"December"
:
"12月"
,
"Default"
:
"預設"
,
...
...
@@ -133,9 +133,9 @@
"delete"
:
"刪除"
,
"Delete"
:
"刪除"
,
"Delete a model"
:
"刪除一個模型"
,
"Delete All Chats"
:
""
,
"Delete chat"
:
"刪除聊天紀錄"
,
"Delete Chat"
:
"刪除聊天紀錄"
,
"Delete Chats"
:
"刪除聊天紀錄"
,
"delete this link"
:
"刪除此連結"
,
"Delete User"
:
"刪除用戶"
,
"Deleted {{deleteModelTag}}"
:
"已刪除 {{deleteModelTag}}"
,
...
...
@@ -314,7 +314,6 @@
"OpenAI URL/Key required."
:
"需要 OpenAI URL/金鑰。"
,
"or"
:
"或"
,
"Other"
:
"其他"
,
"Overview"
:
"總覽"
,
"Password"
:
"密碼"
,
"PDF document (.pdf)"
:
"PDF 文件 (.pdf)"
,
"PDF Extract Images (OCR)"
:
"PDF 圖像擷取(OCR 光學文字辨識)"
,
...
...
@@ -365,7 +364,9 @@
"Scan for documents from {{path}}"
:
"從 {{path}} 掃描文件"
,
"Search"
:
"搜尋"
,
"Search a model"
:
"搜尋模型"
,
"Search Chats"
:
""
,
"Search Documents"
:
"搜尋文件"
,
"Search Models"
:
""
,
"Search Prompts"
:
"搜尋提示詞"
,
"Search Results"
:
""
,
"Searching the web for '{{searchQuery}}'"
:
""
,
...
...
src/lib/stores/index.ts
View file @
276b7b90
...
...
@@ -133,9 +133,9 @@ type Config = {
images
?:
boolean
;
default_models
?:
string
[];
default_prompt_suggestions
?:
PromptSuggestion
[];
trusted_header
_auth
?:
boolean
;
auth_
trusted_header
?:
boolean
;
model_config
?:
GlobalModelConfig
;
websearch
?:
boolean
;
enable_
websearch
?:
boolean
;
};
type
PromptSuggestion
=
{
...
...
src/lib/utils/index.ts
View file @
276b7b90
...
...
@@ -12,11 +12,12 @@ export const sanitizeResponseContent = (content: string) => {
.
replace
(
/<$/
,
''
)
.
replaceAll
(
/<
\|[
a-z
]
+
\|
>/g
,
'
'
)
.
replaceAll
(
'
<
'
,
'
<
'
)
.
replaceAll
(
'
>
'
,
'
>
'
)
.
trim
();
};
export
const
revertSanitizedResponseContent
=
(
content
:
string
)
=>
{
return
content
.
replaceAll
(
'
<
'
,
'
<
'
);
return
content
.
replaceAll
(
'
<
'
,
'
<
'
)
.
replaceAll
(
'
>
'
,
'
>
'
)
;
};
export
const
capitalizeFirstLetter
=
(
string
)
=>
{
...
...
src/routes/(app)/admin/+layout.svelte
0 → 100644
View file @
276b7b90
<script lang="ts">
import { onMount, getContext } from 'svelte';
import { WEBUI_NAME, showSidebar } from '$lib/stores';
import MenuLines from '$lib/components/icons/MenuLines.svelte';
import { page } from '$app/stores';
const i18n = getContext('i18n');
</script>
<svelte:head>
<title>
{$i18n.t('Admin Panel')} | {$WEBUI_NAME}
</title>
</svelte:head>
<div class=" flex flex-col w-full min-h-screen max-h-screen">
<div class=" px-4 pt-3 mt-0.5 mb-1">
<div class=" flex items-center gap-1">
<div class="{$showSidebar ? 'md:hidden' : ''} mr-1 self-start flex flex-none items-center">
<button
id="sidebar-toggle-button"
class="cursor-pointer p-1 flex rounded-xl hover:bg-gray-100 dark:hover:bg-gray-850 transition"
on:click={() => {
showSidebar.set(!$showSidebar);
}}
>
<div class=" m-auto self-center">
<MenuLines />
</div>
</button>
</div>
<div class="flex items-center text-xl font-semibold">{$i18n.t('Workspace')}</div>
</div>
</div>
<!-- <div class="px-4 my-1">
<div
class="flex scrollbar-none overflow-x-auto w-fit text-center text-sm font-medium rounded-xl bg-transparent/10 p-1"
>
<a
class="min-w-fit rounded-lg p-1.5 px-3 {$page.url.pathname.includes('/workspace/models')
? 'bg-gray-50 dark:bg-gray-850'
: ''} transition"
href="/workspace/models">{$i18n.t('Models')}</a
>
<a
class="min-w-fit rounded-lg p-1.5 px-3 {$page.url.pathname.includes('/workspace/prompts')
? 'bg-gray-50 dark:bg-gray-850'
: ''} transition"
href="/workspace/prompts">{$i18n.t('Prompts')}</a
>
<a
class="min-w-fit rounded-lg p-1.5 px-3 {$page.url.pathname.includes('/workspace/documents')
? 'bg-gray-50 dark:bg-gray-850'
: ''} transition"
href="/workspace/documents"
>
{$i18n.t('Documents')}
</a>
<a
class="min-w-fit rounded-lg p-1.5 px-3 {$page.url.pathname.includes('/workspace/playground')
? 'bg-gray-50 dark:bg-gray-850'
: ''} transition"
href="/workspace/playground">{$i18n.t('Playground')}</a
>
</div>
</div> -->
<hr class=" my-2 dark:border-gray-850" />
<div class=" py-1 px-5 flex-1 max-h-full overflow-y-auto">
<slot />
</div>
</div>
src/routes/(app)/admin/+page.svelte
View file @
276b7b90
...
...
@@ -82,10 +82,6 @@
});
</script>
<svelte:head>
<title>{$i18n.t('Admin Panel')} | {$WEBUI_NAME}</title>
</svelte:head>
{#key selectedUser}
<EditUserModal
bind:show={showEditUserModal}
...
...
@@ -106,265 +102,222 @@
<UserChatsModal bind:show={showUserChatsModal} user={selectedUser} />
<SettingsModal bind:show={showSettingsModal} />
<div class=" flex flex-col w-full min-h-screen">
{#if loaded}
<div class="px-4 pt-3 mt-0.5 mb-1">
<div class=" flex items-center gap-1">
<div class="{$showSidebar ? 'md:hidden' : ''} mr-1 self-start flex flex-none items-center">
{#if loaded}
<div class="mt-0.5 mb-3 gap-1 flex flex-col md:flex-row justify-between">
<div class="flex md:self-center text-lg font-medium px-0.5">
{$i18n.t('All Users')}
<div class="flex self-center w-[1px] h-6 mx-2.5 bg-gray-200 dark:bg-gray-700" />
<span class="text-lg font-medium text-gray-500 dark:text-gray-300">{users.length}</span>
</div>
<div class="flex gap-1">
<input
class="w-full md:w-60 rounded-xl py-1.5 px-4 text-sm dark:text-gray-300 dark:bg-gray-850 outline-none"
placeholder={$i18n.t('Search')}
bind:value={search}
/>
<div class="flex gap-0.5">
<Tooltip content="Add User">
<button
id="sidebar-toggle-button"
class="cursor-pointer p-1 flex rounded-xl hover:bg-gray-100 dark:hover:bg-gray-850 transition"
class=" px-2 py-2 rounded-xl border border-gray-200 dark:border-gray-600 dark:border-0 hover:bg-gray-100 dark:bg-gray-850 dark:hover:bg-gray-800 transition font-medium text-sm flex items-center space-x-1"
on:click={() => {
show
Sidebar.set(!$showSidebar)
;
show
AddUserModal = !showAddUserModal
;
}}
>
<div class=" m-auto self-center">
<MenuLines />
</div>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16"
fill="currentColor"
class="w-4 h-4"
>
<path
d="M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z"
/>
</svg>
</button>
</div>
<div class="flex items-center text-xl font-semibold">{$i18n.t('Dashboard')}</div>
</div>
</div>
</Tooltip>
<!-- <div class="px-4 my-1">
<div
class="flex scrollbar-none overflow-x-auto w-fit text-center text-sm font-medium rounded-xl bg-transparent/10 p-1"
>
<button
class="min-w-fit rounded-lg p-1.5 px-3 {tab === ''
? 'bg-gray-50 dark:bg-gray-850'
: ''} transition"
type="button"
on:click={() => {
tab = '';
}}>{$i18n.t('Overview')}</button
>
<Tooltip content={$i18n.t('Admin Settings')}>
<button
class=" px-2 py-2 rounded-xl border border-gray-200 dark:border-gray-600 dark:border-0 hover:bg-gray-100 dark:bg-gray-850 dark:hover:bg-gray-800 transition font-medium text-sm flex items-center space-x-1"
on:click={() => {
showSettingsModal = !showSettingsModal;
}}
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16"
fill="currentColor"
class="w-4 h-4"
>
<path
fill-rule="evenodd"
d="M6.955 1.45A.5.5 0 0 1 7.452 1h1.096a.5.5 0 0 1 .497.45l.17 1.699c.484.12.94.312 1.356.562l1.321-1.081a.5.5 0 0 1 .67.033l.774.775a.5.5 0 0 1 .034.67l-1.08 1.32c.25.417.44.873.561 1.357l1.699.17a.5.5 0 0 1 .45.497v1.096a.5.5 0 0 1-.45.497l-1.699.17c-.12.484-.312.94-.562 1.356l1.082 1.322a.5.5 0 0 1-.034.67l-.774.774a.5.5 0 0 1-.67.033l-1.322-1.08c-.416.25-.872.44-1.356.561l-.17 1.699a.5.5 0 0 1-.497.45H7.452a.5.5 0 0 1-.497-.45l-.17-1.699a4.973 4.973 0 0 1-1.356-.562L4.108 13.37a.5.5 0 0 1-.67-.033l-.774-.775a.5.5 0 0 1-.034-.67l1.08-1.32a4.971 4.971 0 0 1-.561-1.357l-1.699-.17A.5.5 0 0 1 1 8.548V7.452a.5.5 0 0 1 .45-.497l1.699-.17c.12-.484.312-.94.562-1.356L2.629 4.107a.5.5 0 0 1 .034-.67l.774-.774a.5.5 0 0 1 .67-.033L5.43 3.71a4.97 4.97 0 0 1 1.356-.561l.17-1.699ZM6 8c0 .538.212 1.026.558 1.385l.057.057a2 2 0 0 0 2.828-2.828l-.058-.056A2 2 0 0 0 6 8Z"
clip-rule="evenodd"
/>
</svg>
</button>
</Tooltip>
</div>
</div> -->
<hr class=" my-2 dark:border-gray-850" />
<div class="px-6">
<div class="mt-0.5 mb-3 gap-1 flex flex-col md:flex-row justify-between">
<div class="flex md:self-center text-lg font-medium px-0.5">
{$i18n.t('All Users')}
<div class="flex self-center w-[1px] h-6 mx-2.5 bg-gray-200 dark:bg-gray-700" />
<span class="text-lg font-medium text-gray-500 dark:text-gray-300">{users.length}</span>
</div>
<div class="flex gap-1">
<input
class="w-full md:w-60 rounded-xl py-1.5 px-4 text-sm dark:text-gray-300 dark:bg-gray-850 outline-none"
placeholder={$i18n.t('Search')}
bind:value={search}
/>
<div class="flex gap-0.5">
<Tooltip content="Add User">
</div>
</div>
<div class="scrollbar-hidden relative whitespace-nowrap overflow-x-auto max-w-full">
<table class="w-full text-sm text-left text-gray-500 dark:text-gray-400 table-auto max-w-full">
<thead class="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-850 dark:text-gray-400">
<tr>
<th scope="col" class="px-3 py-2"> {$i18n.t('Role')} </th>
<th scope="col" class="px-3 py-2"> {$i18n.t('Name')} </th>
<th scope="col" class="px-3 py-2"> {$i18n.t('Email')} </th>
<th scope="col" class="px-3 py-2"> {$i18n.t('Last Active')} </th>
<th scope="col" class="px-3 py-2"> {$i18n.t('Created at')} </th>
<th scope="col" class="px-3 py-2 text-right" />
</tr>
</thead>
<tbody>
{#each users
.filter((user) => {
if (search === '') {
return true;
} else {
let name = user.name.toLowerCase();
const query = search.toLowerCase();
return name.includes(query);
}
})
.slice((page - 1) * 20, page * 20) as user}
<tr class="bg-white border-b dark:bg-gray-900 dark:border-gray-700 text-xs">
<td class="px-3 py-2 min-w-[7rem] w-28">
<button
class=" px-2 py-2 rounded-xl border border-gray-200 dark:border-gray-600 dark:border-0 hover:bg-gray-100 dark:bg-gray-850 dark:hover:bg-gray-800 transition font-medium text-sm flex items-center space-x-1"
class=" flex items-center gap-2 text-xs px-3 py-0.5 rounded-lg {user.role ===
'admin' && 'text-sky-600 dark:text-sky-200 bg-sky-200/30'} {user.role ===
'user' && 'text-green-600 dark:text-green-200 bg-green-200/30'} {user.role ===
'pending' && 'text-gray-600 dark:text-gray-200 bg-gray-200/30'}"
on:click={() => {
showAddUserModal = !showAddUserModal;
if (user.role === 'user') {
updateRoleHandler(user.id, 'admin');
} else if (user.role === 'pending') {
updateRoleHandler(user.id, 'user');
} else {
updateRoleHandler(user.id, 'pending');
}
}}
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16"
fill="currentColor"
class="w-4 h-4"
>
<path
d="M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z"
/>
</svg>
</button>
</Tooltip>
<Tooltip content={$i18n.t('Admin Settings')}>
<button
class=" px-2 py-2 rounded-xl border border-gray-200 dark:border-gray-600 dark:border-0 hover:bg-gray-100 dark:bg-gray-850 dark:hover:bg-gray-800 transition font-medium text-sm flex items-center space-x-1"
on:click={() => {
showSettingsModal = !showSettingsModal;
}}
<div
class="w-1 h-1 rounded-full {user.role === 'admin' &&
'bg-sky-600 dark:bg-sky-300'} {user.role === 'user' &&
'bg-green-600 dark:bg-green-300'} {user.role === 'pending' &&
'bg-gray-600 dark:bg-gray-300'}"
/>
{$i18n.t(user.role)}</button
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16"
fill="currentColor"
class="w-4 h-4"
>
<path
fill-rule="evenodd"
d="M6.955 1.45A.5.5 0 0 1 7.452 1h1.096a.5.5 0 0 1 .497.45l.17 1.699c.484.12.94.312 1.356.562l1.321-1.081a.5.5 0 0 1 .67.033l.774.775a.5.5 0 0 1 .034.67l-1.08 1.32c.25.417.44.873.561 1.357l1.699.17a.5.5 0 0 1 .45.497v1.096a.5.5 0 0 1-.45.497l-1.699.17c-.12.484-.312.94-.562 1.356l1.082 1.322a.5.5 0 0 1-.034.67l-.774.774a.5.5 0 0 1-.67.033l-1.322-1.08c-.416.25-.872.44-1.356.561l-.17 1.699a.5.5 0 0 1-.497.45H7.452a.5.5 0 0 1-.497-.45l-.17-1.699a4.973 4.973 0 0 1-1.356-.562L4.108 13.37a.5.5 0 0 1-.67-.033l-.774-.775a.5.5 0 0 1-.034-.67l1.08-1.32a4.971 4.971 0 0 1-.561-1.357l-1.699-.17A.5.5 0 0 1 1 8.548V7.452a.5.5 0 0 1 .45-.497l1.699-.17c.12-.484.312-.94.562-1.356L2.629 4.107a.5.5 0 0 1 .034-.67l.774-.774a.5.5 0 0 1 .67-.033L5.43 3.71a4.97 4.97 0 0 1 1.356-.561l.17-1.699ZM6 8c0 .538.212 1.026.558 1.385l.057.057a2 2 0 0 0 2.828-2.828l-.058-.056A2 2 0 0 0 6 8Z"
clip-rule="evenodd"
/>
</svg>
</button>
</Tooltip>
</div>
</div>
</div>
<div class="scrollbar-hidden relative overflow-x-auto whitespace-nowrap">
<table class="w-full text-sm text-left text-gray-500 dark:text-gray-400 table-auto">
<thead
class="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-850 dark:text-gray-400"
>
<tr>
<th scope="col" class="px-3 py-2"> {$i18n.t('Role')} </th>
<th scope="col" class="px-3 py-2"> {$i18n.t('Name')} </th>
<th scope="col" class="px-3 py-2"> {$i18n.t('Email')} </th>
<th scope="col" class="px-3 py-2"> {$i18n.t('Last Active')} </th>
<th scope="col" class="px-3 py-2"> {$i18n.t('Created at')} </th>
<th scope="col" class="px-3 py-2 text-right" />
</tr>
</thead>
<tbody>
{#each users
.filter((user) => {
if (search === '') {
return true;
} else {
let name = user.name.toLowerCase();
const query = search.toLowerCase();
return name.includes(query);
}
})
.slice((page - 1) * 20, page * 20) as user}
<tr class="bg-white border-b dark:bg-gray-900 dark:border-gray-700 text-xs">
<td class="px-3 py-2 min-w-[7rem] w-28">
<button
class=" flex items-center gap-2 text-xs px-3 py-0.5 rounded-lg {user.role ===
'admin' && 'text-sky-600 dark:text-sky-200 bg-sky-200/30'} {user.role ===
'user' && 'text-green-600 dark:text-green-200 bg-green-200/30'} {user.role ===
'pending' && 'text-gray-600 dark:text-gray-200 bg-gray-200/30'}"
on:click={() => {
if (user.role === 'user') {
updateRoleHandler(user.id, 'admin');
} else if (user.role === 'pending') {
updateRoleHandler(user.id, 'user');
} else {
updateRoleHandler(user.id, 'pending');
}
}}
>
<div
class="w-1 h-1 rounded-full {user.role === 'admin' &&
'bg-sky-600 dark:bg-sky-300'} {user.role === 'user' &&
'bg-green-600 dark:bg-green-300'} {user.role === 'pending' &&
'bg-gray-600 dark:bg-gray-300'}"
/>
{$i18n.t(user.role)}</button
>
</td>
<td class="px-3 py-2 font-medium text-gray-900 dark:text-white w-max">
<div class="flex flex-row w-max">
<img
class=" rounded-full w-6 h-6 object-cover mr-2.5"
src={user.profile_image_url.startsWith(WEBUI_BASE_URL) ||
user.profile_image_url.startsWith('https://www.gravatar.com/avatar/') ||
user.profile_image_url.startsWith('data:')
? user.profile_image_url
: `/user.png`}
alt="user"
/>
<div class=" font-medium self-center">{user.name}</div>
</div>
</td>
<td class=" px-3 py-2"> {user.email} </td>
<td class=" px-3 py-2">
{dayjs(user.last_active_at * 1000).fromNow()}
</td>
<td class=" px-3 py-2">
{dayjs(user.created_at * 1000).format($i18n.t('MMMM DD, YYYY'))}
</td>
<td class="px-3 py-2 text-right">
<div class="flex justify-end w-full">
{#if user.role !== 'admin'}
<Tooltip content={$i18n.t('Chats')}>
<button
class="self-center w-fit text-sm px-2 py-2 hover:bg-black/5 dark:hover:bg-white/5 rounded-xl"
on:click={async () => {
showUserChatsModal = !showUserChatsModal;
selectedUser = user;
}}
>
<ChatBubbles />
</button>
</Tooltip>
<Tooltip content={$i18n.t('Edit User')}>
<button
class="self-center w-fit text-sm px-2 py-2 hover:bg-black/5 dark:hover:bg-white/5 rounded-xl"
on:click={async () => {
showEditUserModal = !showEditUserModal;
selectedUser = user;
}}
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-4 h-4"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"
/>
</svg>
</button>
</Tooltip>
<Tooltip content={$i18n.t('Delete User')}>
<button
class="self-center w-fit text-sm px-2 py-2 hover:bg-black/5 dark:hover:bg-white/5 rounded-xl"
on:click={async () => {
deleteUserHandler(user.id);
}}
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-4 h-4"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"
/>
</svg>
</button>
</Tooltip>
{/if}
</div>
</td>
</tr>
{/each}
</tbody>
</table>
</div>
<div class=" text-gray-500 text-xs mt-2 text-right">
ⓘ {$i18n.t("Click on the user role button to change a user's role.")}
</div>
<Pagination bind:page count={users.length} />
</div>
{/if}
</div>
</td>
<td class="px-3 py-2 font-medium text-gray-900 dark:text-white w-max">
<div class="flex flex-row w-max">
<img
class=" rounded-full w-6 h-6 object-cover mr-2.5"
src={user.profile_image_url.startsWith(WEBUI_BASE_URL) ||
user.profile_image_url.startsWith('https://www.gravatar.com/avatar/') ||
user.profile_image_url.startsWith('data:')
? user.profile_image_url
: `/user.png`}
alt="user"
/>
<div class=" font-medium self-center">{user.name}</div>
</div>
</td>
<td class=" px-3 py-2"> {user.email} </td>
<td class=" px-3 py-2">
{dayjs(user.last_active_at * 1000).fromNow()}
</td>
<td class=" px-3 py-2">
{dayjs(user.created_at * 1000).format($i18n.t('MMMM DD, YYYY'))}
</td>
<td class="px-3 py-2 text-right">
<div class="flex justify-end w-full">
{#if user.role !== 'admin'}
<Tooltip content={$i18n.t('Chats')}>
<button
class="self-center w-fit text-sm px-2 py-2 hover:bg-black/5 dark:hover:bg-white/5 rounded-xl"
on:click={async () => {
showUserChatsModal = !showUserChatsModal;
selectedUser = user;
}}
>
<ChatBubbles />
</button>
</Tooltip>
<Tooltip content={$i18n.t('Edit User')}>
<button
class="self-center w-fit text-sm px-2 py-2 hover:bg-black/5 dark:hover:bg-white/5 rounded-xl"
on:click={async () => {
showEditUserModal = !showEditUserModal;
selectedUser = user;
}}
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-4 h-4"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"
/>
</svg>
</button>
</Tooltip>
<Tooltip content={$i18n.t('Delete User')}>
<button
class="self-center w-fit text-sm px-2 py-2 hover:bg-black/5 dark:hover:bg-white/5 rounded-xl"
on:click={async () => {
deleteUserHandler(user.id);
}}
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-4 h-4"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"
/>
</svg>
</button>
</Tooltip>
{/if}
</div>
</td>
</tr>
{/each}
</tbody>
</table>
</div>
<div class=" text-gray-500 text-xs mt-2 text-right">
ⓘ {$i18n.t("Click on the user role button to change a user's role.")}
</div>
<Pagination bind:page count={users.length} />
{/if}
<style>
.font-mona {
...
...
src/routes/(app)/workspace/models/create/+page.svelte
View file @
276b7b90
...
...
@@ -62,7 +62,7 @@
info.id = id;
info.name = name;
info.meta.capabilities = capabilities;
info.params.stop = params.stop
!== null
? params.stop.split(',').filter((s) => s.trim()) : null;
info.params.stop = params.stop ? params.stop.split(',').filter((s) => s.trim()) : null;
if ($models.find((m) => m.id === info.id)) {
toast.error(
...
...
@@ -316,11 +316,9 @@
bind:value={info.base_model_id}
required
>
<option value={null} class=" placeholder:text-gray-500"
>{$i18n.t('Select a base model')}</option
>
<option value={null} class=" text-gray-900">{$i18n.t('Select a base model')}</option>
{#each $models.filter((m) => !m?.preset) as model}
<option value={model.id}>{model.name}</option>
<option value={model.id}
class=" text-gray-900"
>{model.name}</option>
{/each}
</select>
</div>
...
...
Prev
1
2
3
4
5
6
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment