fixed ui problem

This commit is contained in:
Saifeddine ALOUI 2024-07-10 23:52:58 +02:00
parent 66ecc7f256
commit 2d358c22ee
11 changed files with 27 additions and 36 deletions

@ -1 +1 @@
Subproject commit 5dbce07f5d623065b37e3c7ccee860d9cc9ed46e
Subproject commit 4c3c611f0b80af949481d0c4927f554e4481f215

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 459 KiB

BIN
web/dist/assets/logo-f63ca8ad.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 782 KiB

4
web/dist/index.html vendored
View File

@ -6,8 +6,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LoLLMS WebUI</title>
<script type="module" crossorigin src="/assets/index-a71c2ca5.js"></script>
<link rel="stylesheet" href="/assets/index-7f382e92.css">
<script type="module" crossorigin src="/assets/index-f6b4f977.js"></script>
<link rel="stylesheet" href="/assets/index-cc102f75.css">
</head>
<body>
<div id="app"></div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 459 KiB

After

Width:  |  Height:  |  Size: 799 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 459 KiB

After

Width:  |  Height:  |  Size: 782 KiB

View File

@ -4,7 +4,6 @@ import axios from "axios";
import App from './App.vue'
import router from './router'
import socket from '@/services/websocket.js'
import './assets/tailwind.css'
//import './assets/tailwind_april_fool.css'
@ -241,6 +240,7 @@ export const store = createStore({
async refreshConfig({ commit }) {
console.log("Fetching configuration");
try {
console.log("Fetching configuration with client id: ", this.state.client_id);
const configFile = await api_post_req('get_config', this.state.client_id)
if(configFile.active_personality_id<0){
configFile.active_personality_id=0;
@ -267,14 +267,11 @@ export const store = createStore({
commit('setDatabases', databases);
},
async fetchisRTOn({ commit }) {
console.log("is_rt_on", this.state.client_id)
const response = await axios.get(
'/is_rt_on'
);
console.log("response", response)
const is_rt_on = response.data.status;
console.log("is_rt_on", is_rt_on)
commit('setRTOn', is_rt_on);
},
async fetchLanguages({ commit }) {
@ -590,13 +587,6 @@ async function refreshHardwareUsage(store) {
let actionsExecuted = false;
app.mixin({
async socketIOConnected(){
},
socketIODisconnected(){
this.$store.state.isConnected=false;
},
async created() {
if (!actionsExecuted) {
this.$store.state.api_get_req = api_get_req
@ -606,8 +596,6 @@ app.mixin({
console.log("Main.js created")
},
beforeMount() {
socket.on('connected',this.socketIOConnected)
socket.on('disconnected',this.socketIODisconnected)
console.log("Main.js before mount")
},
mounted() {

View File

@ -2133,6 +2133,22 @@ export default {
console.log("Created discussions view")
const response = await axios.get('/get_versionID');
const serverVersionId = response.data.versionId;
socket.onopen = () => {
console.log('WebSocket connection established.');
if (this.currentDiscussion!=null){
this.setPageTitle(item)
localStorage.setItem('selected_discussion', this.currentDiscussion.id)
this.load_discussion(item.id, ()=>{
if (this.discussionArr.length > 1) {
if (this.currentDiscussion.title === '' || this.currentDiscussion.title === null) {
this.changeTitleUsingUserMSG(this.currentDiscussion.id, this.discussionArr[1].content)
}
}
});
}
};
if (this.versionId !== serverVersionId) {
// Update the store value
this.$store.commit('updateVersionId', serverVersionId);
@ -2158,6 +2174,7 @@ export default {
try{
this.$store.state.loading_infos = "Loading Configuration"
while(socket.id===undefined){}
this.$store.state.client_id = socket.id
console.log(this.$store.state.client_id)
await this.$store.dispatch('refreshConfig');
@ -2265,20 +2282,6 @@ export default {
socket.on('update_message', this.streamMessageContent)
socket.on('close_message', this.finalMsgEvent)
socket.onopen = () => {
console.log('WebSocket connection established.');
if (this.currentDiscussion!=null){
this.setPageTitle(item)
localStorage.setItem('selected_discussion', this.currentDiscussion.id)
this.load_discussion(item.id, ()=>{
if (this.discussionArr.length > 1) {
if (this.currentDiscussion.title === '' || this.currentDiscussion.title === null) {
this.changeTitleUsingUserMSG(this.currentDiscussion.id, this.discussionArr[1].content)
}
}
});
}
};
socket.on('disucssion_renamed',(event)=>{
console.log('Received new title', event.discussion_id, event.title);
const index = this.list.findIndex((x) => x.id == event.discussion_id)