mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
refac
This commit is contained in:
parent
a28bec865b
commit
464b086ec5
@ -292,36 +292,36 @@
|
|||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
titleAutoGenerate = $settings?.title?.auto ?? true;
|
titleAutoGenerate = $settings?.title?.auto ?? true;
|
||||||
autoTags = $settings.autoTags ?? true;
|
autoTags = $settings?.autoTags ?? true;
|
||||||
autoFollowUps = $settings.autoFollowUps ?? true;
|
autoFollowUps = $settings?.autoFollowUps ?? true;
|
||||||
|
|
||||||
highContrastMode = $settings.highContrastMode ?? false;
|
highContrastMode = $settings?.highContrastMode ?? false;
|
||||||
|
|
||||||
detectArtifacts = $settings.detectArtifacts ?? true;
|
detectArtifacts = $settings?.detectArtifacts ?? true;
|
||||||
responseAutoCopy = $settings.responseAutoCopy ?? false;
|
responseAutoCopy = $settings?.responseAutoCopy ?? false;
|
||||||
|
|
||||||
showUsername = $settings.showUsername ?? false;
|
showUsername = $settings?.showUsername ?? false;
|
||||||
showUpdateToast = $settings.showUpdateToast ?? true;
|
showUpdateToast = $settings?.showUpdateToast ?? true;
|
||||||
showChangelog = $settings.showChangelog ?? true;
|
showChangelog = $settings?.showChangelog ?? true;
|
||||||
|
|
||||||
showEmojiInCall = $settings.showEmojiInCall ?? false;
|
showEmojiInCall = $settings?.showEmojiInCall ?? false;
|
||||||
voiceInterruption = $settings.voiceInterruption ?? false;
|
voiceInterruption = $settings?.voiceInterruption ?? false;
|
||||||
|
|
||||||
richTextInput = $settings.richTextInput ?? true;
|
richTextInput = $settings?.richTextInput ?? true;
|
||||||
promptAutocomplete = $settings.promptAutocomplete ?? false;
|
promptAutocomplete = $settings?.promptAutocomplete ?? false;
|
||||||
largeTextAsFile = $settings.largeTextAsFile ?? false;
|
largeTextAsFile = $settings?.largeTextAsFile ?? false;
|
||||||
copyFormatted = $settings.copyFormatted ?? false;
|
copyFormatted = $settings?.copyFormatted ?? false;
|
||||||
|
|
||||||
collapseCodeBlocks = $settings.collapseCodeBlocks ?? false;
|
collapseCodeBlocks = $settings?.collapseCodeBlocks ?? false;
|
||||||
expandDetails = $settings.expandDetails ?? false;
|
expandDetails = $settings?.expandDetails ?? false;
|
||||||
|
|
||||||
landingPageMode = $settings.landingPageMode ?? '';
|
landingPageMode = $settings?.landingPageMode ?? '';
|
||||||
chatBubble = $settings.chatBubble ?? true;
|
chatBubble = $settings?.chatBubble ?? true;
|
||||||
widescreenMode = $settings.widescreenMode ?? false;
|
widescreenMode = $settings?.widescreenMode ?? false;
|
||||||
splitLargeChunks = $settings.splitLargeChunks ?? false;
|
splitLargeChunks = $settings?.splitLargeChunks ?? false;
|
||||||
scrollOnBranchChange = $settings.scrollOnBranchChange ?? true;
|
scrollOnBranchChange = $settings?.scrollOnBranchChange ?? true;
|
||||||
chatDirection = $settings.chatDirection ?? 'auto';
|
chatDirection = $settings?.chatDirection ?? 'auto';
|
||||||
userLocation = $settings.userLocation ?? false;
|
userLocation = $settings?.userLocation ?? false;
|
||||||
|
|
||||||
notificationSound = $settings?.notificationSound ?? true;
|
notificationSound = $settings?.notificationSound ?? true;
|
||||||
notificationSoundAlways = $settings?.notificationSoundAlways ?? false;
|
notificationSoundAlways = $settings?.notificationSoundAlways ?? false;
|
||||||
@ -331,19 +331,19 @@
|
|||||||
|
|
||||||
stylizedPdfExport = $settings?.stylizedPdfExport ?? true;
|
stylizedPdfExport = $settings?.stylizedPdfExport ?? true;
|
||||||
|
|
||||||
hapticFeedback = $settings.hapticFeedback ?? false;
|
hapticFeedback = $settings?.hapticFeedback ?? false;
|
||||||
ctrlEnterToSend = $settings.ctrlEnterToSend ?? false;
|
ctrlEnterToSend = $settings?.ctrlEnterToSend ?? false;
|
||||||
|
|
||||||
imageCompression = $settings.imageCompression ?? false;
|
imageCompression = $settings?.imageCompression ?? false;
|
||||||
imageCompressionSize = $settings.imageCompressionSize ?? { width: '', height: '' };
|
imageCompressionSize = $settings?.imageCompressionSize ?? { width: '', height: '' };
|
||||||
|
|
||||||
defaultModelId = $settings?.models?.at(0) ?? '';
|
defaultModelId = $settings?.models?.at(0) ?? '';
|
||||||
if ($config?.default_models) {
|
if ($config?.default_models) {
|
||||||
defaultModelId = $config.default_models.split(',')[0];
|
defaultModelId = $config.default_models.split(',')[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
backgroundImageUrl = $settings.backgroundImageUrl ?? null;
|
backgroundImageUrl = $settings?.backgroundImageUrl ?? null;
|
||||||
webSearch = $settings.webSearch ?? null;
|
webSearch = $settings?.webSearch ?? null;
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -583,10 +583,10 @@
|
|||||||
class={`px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition
|
class={`px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition
|
||||||
${
|
${
|
||||||
selectedTab === 'general'
|
selectedTab === 'general'
|
||||||
? ($settings.highContrastMode ?? false)
|
? ($settings?.highContrastMode ?? false)
|
||||||
? 'dark:bg-gray-800 bg-gray-200'
|
? 'dark:bg-gray-800 bg-gray-200'
|
||||||
: ''
|
: ''
|
||||||
: ($settings.highContrastMode ?? false)
|
: ($settings?.highContrastMode ?? false)
|
||||||
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
||||||
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'
|
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'
|
||||||
}`}
|
}`}
|
||||||
@ -615,10 +615,10 @@
|
|||||||
class={`px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition
|
class={`px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition
|
||||||
${
|
${
|
||||||
selectedTab === 'interface'
|
selectedTab === 'interface'
|
||||||
? ($settings.highContrastMode ?? false)
|
? ($settings?.highContrastMode ?? false)
|
||||||
? 'dark:bg-gray-800 bg-gray-200'
|
? 'dark:bg-gray-800 bg-gray-200'
|
||||||
: ''
|
: ''
|
||||||
: ($settings.highContrastMode ?? false)
|
: ($settings?.highContrastMode ?? false)
|
||||||
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
||||||
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'
|
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'
|
||||||
}`}
|
}`}
|
||||||
@ -648,10 +648,10 @@
|
|||||||
class={`px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition
|
class={`px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition
|
||||||
${
|
${
|
||||||
selectedTab === 'connections'
|
selectedTab === 'connections'
|
||||||
? ($settings.highContrastMode ?? false)
|
? ($settings?.highContrastMode ?? false)
|
||||||
? 'dark:bg-gray-800 bg-gray-200'
|
? 'dark:bg-gray-800 bg-gray-200'
|
||||||
: ''
|
: ''
|
||||||
: ($settings.highContrastMode ?? false)
|
: ($settings?.highContrastMode ?? false)
|
||||||
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
||||||
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'
|
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'
|
||||||
}`}
|
}`}
|
||||||
@ -680,10 +680,10 @@
|
|||||||
class={`px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition
|
class={`px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition
|
||||||
${
|
${
|
||||||
selectedTab === 'tools'
|
selectedTab === 'tools'
|
||||||
? ($settings.highContrastMode ?? false)
|
? ($settings?.highContrastMode ?? false)
|
||||||
? 'dark:bg-gray-800 bg-gray-200'
|
? 'dark:bg-gray-800 bg-gray-200'
|
||||||
: ''
|
: ''
|
||||||
: ($settings.highContrastMode ?? false)
|
: ($settings?.highContrastMode ?? false)
|
||||||
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
||||||
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'
|
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'
|
||||||
}`}
|
}`}
|
||||||
@ -713,10 +713,10 @@
|
|||||||
class={`px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition
|
class={`px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition
|
||||||
${
|
${
|
||||||
selectedTab === 'personalization'
|
selectedTab === 'personalization'
|
||||||
? ($settings.highContrastMode ?? false)
|
? ($settings?.highContrastMode ?? false)
|
||||||
? 'dark:bg-gray-800 bg-gray-200'
|
? 'dark:bg-gray-800 bg-gray-200'
|
||||||
: ''
|
: ''
|
||||||
: ($settings.highContrastMode ?? false)
|
: ($settings?.highContrastMode ?? false)
|
||||||
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
||||||
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'
|
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'
|
||||||
}`}
|
}`}
|
||||||
@ -734,10 +734,10 @@
|
|||||||
class={`px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition
|
class={`px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition
|
||||||
${
|
${
|
||||||
selectedTab === 'audio'
|
selectedTab === 'audio'
|
||||||
? ($settings.highContrastMode ?? false)
|
? ($settings?.highContrastMode ?? false)
|
||||||
? 'dark:bg-gray-800 bg-gray-200'
|
? 'dark:bg-gray-800 bg-gray-200'
|
||||||
: ''
|
: ''
|
||||||
: ($settings.highContrastMode ?? false)
|
: ($settings?.highContrastMode ?? false)
|
||||||
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
||||||
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'
|
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'
|
||||||
}`}
|
}`}
|
||||||
@ -767,10 +767,10 @@
|
|||||||
class={`px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition
|
class={`px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition
|
||||||
${
|
${
|
||||||
selectedTab === 'chats'
|
selectedTab === 'chats'
|
||||||
? ($settings.highContrastMode ?? false)
|
? ($settings?.highContrastMode ?? false)
|
||||||
? 'dark:bg-gray-800 bg-gray-200'
|
? 'dark:bg-gray-800 bg-gray-200'
|
||||||
: ''
|
: ''
|
||||||
: ($settings.highContrastMode ?? false)
|
: ($settings?.highContrastMode ?? false)
|
||||||
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
||||||
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'
|
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'
|
||||||
}`}
|
}`}
|
||||||
@ -799,10 +799,10 @@
|
|||||||
class={`px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition
|
class={`px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition
|
||||||
${
|
${
|
||||||
selectedTab === 'account'
|
selectedTab === 'account'
|
||||||
? ($settings.highContrastMode ?? false)
|
? ($settings?.highContrastMode ?? false)
|
||||||
? 'dark:bg-gray-800 bg-gray-200'
|
? 'dark:bg-gray-800 bg-gray-200'
|
||||||
: ''
|
: ''
|
||||||
: ($settings.highContrastMode ?? false)
|
: ($settings?.highContrastMode ?? false)
|
||||||
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
||||||
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'
|
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'
|
||||||
}`}
|
}`}
|
||||||
@ -831,10 +831,10 @@
|
|||||||
class={`px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition
|
class={`px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition
|
||||||
${
|
${
|
||||||
selectedTab === 'about'
|
selectedTab === 'about'
|
||||||
? ($settings.highContrastMode ?? false)
|
? ($settings?.highContrastMode ?? false)
|
||||||
? 'dark:bg-gray-800 bg-gray-200'
|
? 'dark:bg-gray-800 bg-gray-200'
|
||||||
: ''
|
: ''
|
||||||
: ($settings.highContrastMode ?? false)
|
: ($settings?.highContrastMode ?? false)
|
||||||
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
||||||
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'
|
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'
|
||||||
}`}
|
}`}
|
||||||
@ -868,7 +868,7 @@
|
|||||||
|
|
||||||
{#if $user?.role === 'admin'}
|
{#if $user?.role === 'admin'}
|
||||||
<button
|
<button
|
||||||
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {$settings.highContrastMode
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {$settings?.highContrastMode
|
||||||
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
||||||
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'}"
|
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'}"
|
||||||
on:click={async () => {
|
on:click={async () => {
|
||||||
|
@ -149,8 +149,6 @@ type Settings = {
|
|||||||
ctrlEnterToSend?: boolean;
|
ctrlEnterToSend?: boolean;
|
||||||
|
|
||||||
system?: string;
|
system?: string;
|
||||||
requestFormat?: string;
|
|
||||||
keepAlive?: string;
|
|
||||||
seed?: number;
|
seed?: number;
|
||||||
temperature?: string;
|
temperature?: string;
|
||||||
repeat_penalty?: string;
|
repeat_penalty?: string;
|
||||||
|
Loading…
Reference in New Issue
Block a user