mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-06-19 07:48:07 +00:00
Enhanced ui advanced the new fastapi version
This commit is contained in:
File diff suppressed because one or more lines are too long
@ -5,7 +5,7 @@
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Vite + Vue</title>
|
||||
<script type="module" crossorigin src="/assets/index-26HIjSQ3.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-tXzDSVtv.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-uMQcfNrh.css">
|
||||
</head>
|
||||
<body>
|
||||
|
@ -0,0 +1,25 @@
|
||||
// Project : lollms-webui
|
||||
// Author : ParisNeo
|
||||
// Description :
|
||||
// All websocket stuff can be found here.
|
||||
// More info can be found here https://socket.io/how-to/use-with-vue
|
||||
// import { createApp } from 'vue';
|
||||
import io from 'socket.io-client';
|
||||
|
||||
// fixes issues when people not hosting this site on local network
|
||||
const URL = window.location.origin;
|
||||
console.log(URL);
|
||||
const socket = new io(URL, {
|
||||
reconnection: true, // Enable reconnection
|
||||
reconnectionAttempts: 10, // Maximum reconnection attempts
|
||||
reconnectionDelay: 1000, // Delay between reconnection attempts (in milliseconds)
|
||||
});
|
||||
|
||||
// const app = createApp(/* your root component */);
|
||||
|
||||
// app.config.globalProperties.$socket = socket;
|
||||
|
||||
// app.mount(/* your root element */);
|
||||
|
||||
export default socket;
|
||||
|
@ -69,21 +69,16 @@ export default {
|
||||
};
|
||||
},
|
||||
async mounted(){
|
||||
this.personal_path = await axios.get("/get_personal_path")
|
||||
socket.on('notification', this.notify)
|
||||
let response = await axios.get("/get_personal_path")
|
||||
this.personal_path = response.data
|
||||
console.log(this.personal_path)
|
||||
//socket.on('notification', this.notify)
|
||||
},
|
||||
components:{
|
||||
MessageBox,
|
||||
Toast
|
||||
},
|
||||
methods: {
|
||||
folderSelected(event) {
|
||||
const files = event.target.files;
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
console.log(files[i].webkitRelativePath);
|
||||
}
|
||||
personal_path = files[0].webkitRelativePath
|
||||
},
|
||||
notify(notif){
|
||||
self.isGenerating = false
|
||||
this.setDiscussionLoading(this.currentDiscussion.id, this.isGenerating);
|
||||
@ -118,15 +113,6 @@ export default {
|
||||
this.$refs.messageBox.showMessage("Success!\nPlease close this page and open the run script from your install folder")
|
||||
});
|
||||
},
|
||||
selectFolder() {
|
||||
axios.get('/choose_path')
|
||||
.then(response => {
|
||||
this.personal_path = response.data.new_path;
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user