mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-18 20:17:50 +00:00
Fixed database loading and creation
This commit is contained in:
parent
45aa636d86
commit
70f86767aa
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 @@
|
||||
<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-e60b333e.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-f7ef3f13.css">
|
||||
<script type="module" crossorigin src="/assets/index-10f963c7.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-9cbc113c.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
@ -905,7 +905,13 @@ export default {
|
||||
onclosedatabase_selectorDialog(){this.database_selectorDialogVisible=false;},
|
||||
async onvalidatedatabase_selectorChoice(choice){
|
||||
this.database_selectorDialogVisible=false;
|
||||
const res = await axios.post("/select_database", {"client_id":this.client_id, "name": choice}, {headers: this.posts_headers});
|
||||
const data = {
|
||||
"client_id": this.client_id,
|
||||
"name": typeof choice === 'string' ? choice : choice.name
|
||||
};
|
||||
console.log("data:")
|
||||
console.log(data)
|
||||
const res = await axios.post("/select_database", data, {headers: this.posts_headers});
|
||||
if(res.status){
|
||||
console.log("Selected database")
|
||||
this.$store.state.config = await axios.post("/get_config",{"client_id":this.client_id});
|
||||
|
@ -466,6 +466,14 @@ export default {
|
||||
|
||||
}
|
||||
this.$store.dispatch('refreshMountedPersonalities');
|
||||
const hostnameParts = window.location.href.split('/');
|
||||
|
||||
if(hostnameParts.length > 4){
|
||||
window.location.href='/'
|
||||
}
|
||||
else{
|
||||
window.location.reload(true);
|
||||
}
|
||||
} else {
|
||||
pers.isMounted = false
|
||||
this.$store.state.toast.showToast("Could not mount personality\nError: " + res.error + "\nResponse:\n" + res, 4, false)
|
||||
|
Loading…
Reference in New Issue
Block a user