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 () => {
|
||||
titleAutoGenerate = $settings?.title?.auto ?? true;
|
||||
autoTags = $settings.autoTags ?? true;
|
||||
autoFollowUps = $settings.autoFollowUps ?? true;
|
||||
autoTags = $settings?.autoTags ?? true;
|
||||
autoFollowUps = $settings?.autoFollowUps ?? true;
|
||||
|
||||
highContrastMode = $settings.highContrastMode ?? false;
|
||||
highContrastMode = $settings?.highContrastMode ?? false;
|
||||
|
||||
detectArtifacts = $settings.detectArtifacts ?? true;
|
||||
responseAutoCopy = $settings.responseAutoCopy ?? false;
|
||||
detectArtifacts = $settings?.detectArtifacts ?? true;
|
||||
responseAutoCopy = $settings?.responseAutoCopy ?? false;
|
||||
|
||||
showUsername = $settings.showUsername ?? false;
|
||||
showUpdateToast = $settings.showUpdateToast ?? true;
|
||||
showChangelog = $settings.showChangelog ?? true;
|
||||
showUsername = $settings?.showUsername ?? false;
|
||||
showUpdateToast = $settings?.showUpdateToast ?? true;
|
||||
showChangelog = $settings?.showChangelog ?? true;
|
||||
|
||||
showEmojiInCall = $settings.showEmojiInCall ?? false;
|
||||
voiceInterruption = $settings.voiceInterruption ?? false;
|
||||
showEmojiInCall = $settings?.showEmojiInCall ?? false;
|
||||
voiceInterruption = $settings?.voiceInterruption ?? false;
|
||||
|
||||
richTextInput = $settings.richTextInput ?? true;
|
||||
promptAutocomplete = $settings.promptAutocomplete ?? false;
|
||||
largeTextAsFile = $settings.largeTextAsFile ?? false;
|
||||
copyFormatted = $settings.copyFormatted ?? false;
|
||||
richTextInput = $settings?.richTextInput ?? true;
|
||||
promptAutocomplete = $settings?.promptAutocomplete ?? false;
|
||||
largeTextAsFile = $settings?.largeTextAsFile ?? false;
|
||||
copyFormatted = $settings?.copyFormatted ?? false;
|
||||
|
||||
collapseCodeBlocks = $settings.collapseCodeBlocks ?? false;
|
||||
expandDetails = $settings.expandDetails ?? false;
|
||||
collapseCodeBlocks = $settings?.collapseCodeBlocks ?? false;
|
||||
expandDetails = $settings?.expandDetails ?? false;
|
||||
|
||||
landingPageMode = $settings.landingPageMode ?? '';
|
||||
chatBubble = $settings.chatBubble ?? true;
|
||||
widescreenMode = $settings.widescreenMode ?? false;
|
||||
splitLargeChunks = $settings.splitLargeChunks ?? false;
|
||||
scrollOnBranchChange = $settings.scrollOnBranchChange ?? true;
|
||||
chatDirection = $settings.chatDirection ?? 'auto';
|
||||
userLocation = $settings.userLocation ?? false;
|
||||
landingPageMode = $settings?.landingPageMode ?? '';
|
||||
chatBubble = $settings?.chatBubble ?? true;
|
||||
widescreenMode = $settings?.widescreenMode ?? false;
|
||||
splitLargeChunks = $settings?.splitLargeChunks ?? false;
|
||||
scrollOnBranchChange = $settings?.scrollOnBranchChange ?? true;
|
||||
chatDirection = $settings?.chatDirection ?? 'auto';
|
||||
userLocation = $settings?.userLocation ?? false;
|
||||
|
||||
notificationSound = $settings?.notificationSound ?? true;
|
||||
notificationSoundAlways = $settings?.notificationSoundAlways ?? false;
|
||||
@ -331,19 +331,19 @@
|
||||
|
||||
stylizedPdfExport = $settings?.stylizedPdfExport ?? true;
|
||||
|
||||
hapticFeedback = $settings.hapticFeedback ?? false;
|
||||
ctrlEnterToSend = $settings.ctrlEnterToSend ?? false;
|
||||
hapticFeedback = $settings?.hapticFeedback ?? false;
|
||||
ctrlEnterToSend = $settings?.ctrlEnterToSend ?? false;
|
||||
|
||||
imageCompression = $settings.imageCompression ?? false;
|
||||
imageCompressionSize = $settings.imageCompressionSize ?? { width: '', height: '' };
|
||||
imageCompression = $settings?.imageCompression ?? false;
|
||||
imageCompressionSize = $settings?.imageCompressionSize ?? { width: '', height: '' };
|
||||
|
||||
defaultModelId = $settings?.models?.at(0) ?? '';
|
||||
if ($config?.default_models) {
|
||||
defaultModelId = $config.default_models.split(',')[0];
|
||||
}
|
||||
|
||||
backgroundImageUrl = $settings.backgroundImageUrl ?? null;
|
||||
webSearch = $settings.webSearch ?? null;
|
||||
backgroundImageUrl = $settings?.backgroundImageUrl ?? null;
|
||||
webSearch = $settings?.webSearch ?? null;
|
||||
});
|
||||
</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
|
||||
${
|
||||
selectedTab === 'general'
|
||||
? ($settings.highContrastMode ?? false)
|
||||
? ($settings?.highContrastMode ?? false)
|
||||
? 'dark:bg-gray-800 bg-gray-200'
|
||||
: ''
|
||||
: ($settings.highContrastMode ?? false)
|
||||
: ($settings?.highContrastMode ?? false)
|
||||
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
||||
: '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
|
||||
${
|
||||
selectedTab === 'interface'
|
||||
? ($settings.highContrastMode ?? false)
|
||||
? ($settings?.highContrastMode ?? false)
|
||||
? 'dark:bg-gray-800 bg-gray-200'
|
||||
: ''
|
||||
: ($settings.highContrastMode ?? false)
|
||||
: ($settings?.highContrastMode ?? false)
|
||||
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
||||
: '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
|
||||
${
|
||||
selectedTab === 'connections'
|
||||
? ($settings.highContrastMode ?? false)
|
||||
? ($settings?.highContrastMode ?? false)
|
||||
? 'dark:bg-gray-800 bg-gray-200'
|
||||
: ''
|
||||
: ($settings.highContrastMode ?? false)
|
||||
: ($settings?.highContrastMode ?? false)
|
||||
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
||||
: '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
|
||||
${
|
||||
selectedTab === 'tools'
|
||||
? ($settings.highContrastMode ?? false)
|
||||
? ($settings?.highContrastMode ?? false)
|
||||
? 'dark:bg-gray-800 bg-gray-200'
|
||||
: ''
|
||||
: ($settings.highContrastMode ?? false)
|
||||
: ($settings?.highContrastMode ?? false)
|
||||
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
||||
: '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
|
||||
${
|
||||
selectedTab === 'personalization'
|
||||
? ($settings.highContrastMode ?? false)
|
||||
? ($settings?.highContrastMode ?? false)
|
||||
? 'dark:bg-gray-800 bg-gray-200'
|
||||
: ''
|
||||
: ($settings.highContrastMode ?? false)
|
||||
: ($settings?.highContrastMode ?? false)
|
||||
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
||||
: '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
|
||||
${
|
||||
selectedTab === 'audio'
|
||||
? ($settings.highContrastMode ?? false)
|
||||
? ($settings?.highContrastMode ?? false)
|
||||
? 'dark:bg-gray-800 bg-gray-200'
|
||||
: ''
|
||||
: ($settings.highContrastMode ?? false)
|
||||
: ($settings?.highContrastMode ?? false)
|
||||
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
||||
: '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
|
||||
${
|
||||
selectedTab === 'chats'
|
||||
? ($settings.highContrastMode ?? false)
|
||||
? ($settings?.highContrastMode ?? false)
|
||||
? 'dark:bg-gray-800 bg-gray-200'
|
||||
: ''
|
||||
: ($settings.highContrastMode ?? false)
|
||||
: ($settings?.highContrastMode ?? false)
|
||||
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
||||
: '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
|
||||
${
|
||||
selectedTab === 'account'
|
||||
? ($settings.highContrastMode ?? false)
|
||||
? ($settings?.highContrastMode ?? false)
|
||||
? 'dark:bg-gray-800 bg-gray-200'
|
||||
: ''
|
||||
: ($settings.highContrastMode ?? false)
|
||||
: ($settings?.highContrastMode ?? false)
|
||||
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
||||
: '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
|
||||
${
|
||||
selectedTab === 'about'
|
||||
? ($settings.highContrastMode ?? false)
|
||||
? ($settings?.highContrastMode ?? false)
|
||||
? 'dark:bg-gray-800 bg-gray-200'
|
||||
: ''
|
||||
: ($settings.highContrastMode ?? false)
|
||||
: ($settings?.highContrastMode ?? false)
|
||||
? 'hover:bg-gray-200 dark:hover:bg-gray-800'
|
||||
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'
|
||||
}`}
|
||||
@ -868,7 +868,7 @@
|
||||
|
||||
{#if $user?.role === 'admin'}
|
||||
<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'
|
||||
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'}"
|
||||
on:click={async () => {
|
||||
|
@ -149,8 +149,6 @@ type Settings = {
|
||||
ctrlEnterToSend?: boolean;
|
||||
|
||||
system?: string;
|
||||
requestFormat?: string;
|
||||
keepAlive?: string;
|
||||
seed?: number;
|
||||
temperature?: string;
|
||||
repeat_penalty?: string;
|
||||
|
Loading…
Reference in New Issue
Block a user