mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-19 04:17:52 +00:00
Upgraded
This commit is contained in:
parent
96b245e138
commit
7e95ce173e
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
4
web/dist/index.html
vendored
@ -6,8 +6,8 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>LoLLMS WebUI - Welcome</title>
|
||||
<script type="module" crossorigin src="/assets/index-c54d7272.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-6c6983a2.css">
|
||||
<script type="module" crossorigin src="/assets/index-50afe6ea.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-62d6a6f7.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
@ -16,6 +16,13 @@
|
||||
</RouterLink>
|
||||
<!-- GITHUB AND THEME BUTTONS -->
|
||||
<div class="flex gap-3 flex-1 items-center justify-end">
|
||||
|
||||
<div v-if="!isGenerating" title="Connection status" class="text-green-500">
|
||||
<i data-feather="flag"></i>
|
||||
</div>
|
||||
<div v-if="isGenerating" title="Connection status" class="text-red-500">
|
||||
<i data-feather="flag"></i>
|
||||
</div>
|
||||
<div v-if="isConnected" title="Connection status" class="text-green-500">
|
||||
<i data-feather="zap"></i>
|
||||
</div>
|
||||
@ -82,6 +89,9 @@ import { mapState } from 'vuex';
|
||||
export default {
|
||||
name: 'TopBar',
|
||||
computed:{
|
||||
isGenerating(){
|
||||
return this.$store.state.isGenerating;
|
||||
},
|
||||
isConnected(){
|
||||
return this.$store.state.isConnected;
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ export const store = createStore({
|
||||
version : "unknown",
|
||||
settingsChanged:false,
|
||||
isConnected: false, // Add the isConnected property
|
||||
isGenerating: false,
|
||||
config:null,
|
||||
mountedPers:null,
|
||||
mountedPersArr:[],
|
||||
@ -53,6 +54,10 @@ export const store = createStore({
|
||||
setIsConnected(state, isConnected) {
|
||||
state.isConnected = isConnected;
|
||||
},
|
||||
setIsGenerating(state, isGenerating) {
|
||||
state.isGenerating = isGenerating;
|
||||
},
|
||||
|
||||
setConfig(state, config) {
|
||||
state.config = config;
|
||||
},
|
||||
@ -108,6 +113,11 @@ export const store = createStore({
|
||||
getIsConnected(state) {
|
||||
return state.isConnected
|
||||
},
|
||||
getIsGenerating(state) {
|
||||
return state.isGenerating
|
||||
},
|
||||
|
||||
|
||||
getConfig(state) {
|
||||
return state.config
|
||||
},
|
||||
|
@ -415,7 +415,6 @@ export default {
|
||||
filterTitle: '',
|
||||
filterInProgress: false,
|
||||
isCreated: false,
|
||||
isGenerating: false,
|
||||
isCheckbox: false,
|
||||
isSelectAll: false,
|
||||
showSaveConfirmation: false,
|
||||
@ -1791,13 +1790,13 @@ export default {
|
||||
};
|
||||
socket.on("connect_error", (error) => {
|
||||
if (error.message === "ERR_CONNECTION_REFUSED") {
|
||||
this.$store.state.isConnected = false
|
||||
console.error("Connection refused. The server is not available.");
|
||||
// Handle the ERR_CONNECTION_REFUSED error here
|
||||
} else {
|
||||
console.error("Connection error:", error);
|
||||
// Handle other connection errors here
|
||||
}
|
||||
this.$store.state.isConnected = false
|
||||
});
|
||||
socket.onerror = (event) => {
|
||||
console.log('WebSocket connection error:', event.code, event.reason);
|
||||
@ -1928,6 +1927,14 @@ export default {
|
||||
|
||||
},
|
||||
computed: {
|
||||
isGenerating:{
|
||||
get(){
|
||||
return this.$store.state.isGenerating;
|
||||
},
|
||||
set(val){
|
||||
this.$store.state.isGenerating=val
|
||||
}
|
||||
},
|
||||
formatted_database_name() {
|
||||
const db_name = this.$store.state.config.db_path;
|
||||
const trimmed_name = db_name.slice(0, db_name.length - 3);
|
||||
|
@ -28,7 +28,6 @@ export default async ({ mode }) => {
|
||||
try{
|
||||
serverURL = await getFlaskServerURL()
|
||||
console.log(serverURL)
|
||||
|
||||
}catch{
|
||||
serverURL = process.env.VITE_LOLLMS_API
|
||||
console.log(`Server address: ${serverAddress}`)
|
||||
@ -49,7 +48,7 @@ export default async ({ mode }) => {
|
||||
server: {
|
||||
proxy: {
|
||||
"/api/": {
|
||||
target: serverURL,//process.env.VITE_LOLLMS_API,//getFlaskServerURL(),// process.env.VITE_LOLLMS_API,
|
||||
target: serverURL,//process.env.VITE_LOLLMS_API,//process.env.VITE_LOLLMS_API,//getFlaskServerURL(),// process.env.VITE_LOLLMS_API,
|
||||
changeOrigin: process.env.VITE_LOLLMS_API_CHANGE_ORIGIN,
|
||||
secure: process.env.VITE_LOLLMS_API_SECURE,
|
||||
rewrite: (path) => path.replace(/^\/api/, ""),
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 477129191bf97222a10eedb46723a8f22a2d2ab0
|
||||
Subproject commit 1ce2660d1076a381177d64aec2495dd97765f488
|
Loading…
Reference in New Issue
Block a user