This commit is contained in:
Saifeddine ALOUI 2025-01-22 14:32:22 +01:00
parent 715e13bbba
commit 1fc2de6ea7
8 changed files with 356 additions and 215 deletions

View File

@ -1,5 +1,5 @@
# =================== Lord Of Large Language Multimodal Systems Configuration file ===========================
version: 149
version: 150
# video viewing and news recovering
last_viewed_video: null
@ -9,7 +9,7 @@ model_name: null
model_variant: null
model_type: null
show_news_panel: true
show_news_panel: false
# Security measures
turn_on_setting_update_validation: true

@ -1 +1 @@
Subproject commit 8194b116f7066d2b1a63f93eecf30ac104323bad
Subproject commit e566760cdd8ee3a9e72ed945102668e7702ea483

8
web/dist/assets/index-BxZCDxOb.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
web/dist/index.html vendored
View File

@ -6,8 +6,8 @@
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LoLLMS WebUI</title>
<script type="module" crossorigin src="/assets/index-BgAGctzI.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-HwbqKH2E.css">
<script type="module" crossorigin src="/assets/index-DEmaslXn.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-BxZCDxOb.css">
</head>
<body>
<div id="app"></div>

View File

@ -499,6 +499,134 @@
</div>
</div>
</div>
<!-- Webui Settings -->
<div class="setting-section">
<h3 class="font-bold text-lg text-gray-800 dark:text-gray-200 mb-4">Webui Settings</h3>
<div class="settings-grid grid gap-4">
<!-- Logo Upload Section -->
<div class="setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm">
<div class="flex items-center space-x-4">
<label class="font-bold text-sm text-gray-700 dark:text-gray-200">Application Logo</label>
<!-- Logo Preview -->
<div class="w-10 h-10 rounded-full overflow-hidden bg-gray-200 dark:bg-gray-700">
<img v-if="configFile.app_custom_logo"
:src="'/user_infos/' + configFile.app_custom_logo"
class="w-full h-full object-cover"
alt="Custom Logo">
<img v-else
:src="defaultImgPlaceholder"
class="w-full h-full object-cover"
alt="Default Logo">
</div>
</div>
<div class="flex items-center space-x-2">
<!-- Remove logo button (only show if custom logo exists) -->
<button v-if="configFile.app_custom_logo"
@click="removeLogo"
class="bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded-lg">
Remove Logo
</button>
<label class="cursor-pointer bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg">
Upload Logo
<input type="file"
@change="uploadLogo"
accept="image/*"
class="hidden">
</label>
</div>
</div>
<!-- Auto Title Setting -->
<div class="setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm">
<div class="flex items-center space-x-2">
<label class="font-bold text-sm text-gray-700 dark:text-gray-200">Automatic Discussion Naming</label>
<div class="text-xs text-gray-500 dark:text-gray-400">(Let AI name your discussions automatically)</div>
</div>
<div class="relative inline-block w-12 h-6">
<input type="checkbox"
v-model="configFile.auto_title"
@change="settingsChanged=true"
class="toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer
transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500">
<label class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"></label>
</div>
</div>
<!-- Auto Show Browser Setting -->
<div class="setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm">
<div class="flex items-center space-x-2">
<label class="font-bold text-sm text-gray-700 dark:text-gray-200">Auto-launch Browser</label>
<div class="text-xs text-gray-500 dark:text-gray-400">(Open browser automatically when starting LOLLMS)</div>
</div>
<div class="relative inline-block w-12 h-6">
<input type="checkbox"
v-model="configFile.auto_show_browser"
@change="settingsChanged=true"
class="toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer
transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500">
<label class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"></label>
</div>
</div>
<!-- Remote Access Warning -->
<div class="setting-row flex flex-col p-4 bg-red-50 dark:bg-red-900/20 rounded-lg shadow-sm border-2 border-red-200 dark:border-red-800">
<div class="flex items-center justify-between">
<div class="flex items-center space-x-2">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-red-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
</svg>
<label class="font-bold text-sm text-red-700 dark:text-red-400">Remote Access</label>
</div>
<div class="relative inline-block w-12 h-6">
<input type="checkbox"
v-model="configFile.force_accept_remote_access"
@change="settingsChanged=true"
class="toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer
transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-red-500">
<label class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"></label>
</div>
</div>
<p class="mt-2 text-sm text-red-600 dark:text-red-400">
<strong>Security Warning:</strong> Enabling remote access poses significant security risks. Only enable this if you:
<ul class="list-disc ml-6 mt-1">
<li>Fully understand the security implications</li>
<li>Have proper network security measures in place</li>
<li>Are in a trusted network environment</li>
</ul>
</p>
</div>
<!-- Copy with Details Setting -->
<div class="setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm">
<div class="flex items-center space-x-2">
<label class="font-bold text-sm text-gray-700 dark:text-gray-200">Enhanced Message Copy</label>
<div class="text-xs text-gray-500 dark:text-gray-400">
(Include metadata like sender name and model info when copying messages)
</div>
</div>
<div class="relative inline-block w-12 h-6">
<input type="checkbox"
v-model="configFile.copy_to_clipboard_add_all_details"
@change="settingsChanged=true"
class="toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer
transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500">
<label class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"></label>
</div>
</div>
<!-- Headless Mode -->
<div class="setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm">
<label class="font-bold text-sm text-gray-700 dark:text-gray-200">Headless server mode (DEACTIVATES the WEBUI)</label>
<div class="relative inline-block w-12 h-6">
<input type="checkbox"
v-model="configFile.headless_server_mode"
@change="settingsChanged=true"
class="toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer
transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500">
<label class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"></label>
</div>
</div>
</div>
</div>
</div>
</Card>
@ -5245,6 +5373,19 @@ export default {
this.configFile.user_avatar='';
this.settingsChanged=true
},
removeLogo() {
axios.post('/remove_logo')
.then(() => {
this.configFile.app_custom_logo = null;
this.$store.state.config.app_custom_logo = null;
this.settingsChanged = true;
this.$store.state.toast.showToast("Logo removed successfully!", 4, true);
})
.catch(error => {
console.error('Error removing logo:', error);
this.$store.state.toast.showToast("Error removing logo!", 4, false);
});
},
uploadLogo(event){
const file = event.target.files[0]; // Get the selected file
const formData = new FormData(); // Create a FormData object

@ -1 +1 @@
Subproject commit efaa77bde0b086b49b390735f71f73f43894b89b
Subproject commit 5d9509cd0075a811c4c5703d7172a80698d4ac0a