This commit is contained in:
Saifeddine ALOUI 2024-03-24 20:33:09 +01:00
parent 5d2be7b3e7
commit 2b1dcdf2a9
5 changed files with 19 additions and 10 deletions

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 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LoLLMS WebUI - Welcome</title> <title>LoLLMS WebUI - Welcome</title>
<script type="module" crossorigin src="/assets/index-886b6042.js"></script> <script type="module" crossorigin src="/assets/index-5eeb2e9a.js"></script>
<link rel="stylesheet" href="/assets/index-f8651315.css"> <link rel="stylesheet" href="/assets/index-d147e8ad.css">
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

View File

@ -187,9 +187,9 @@
<!-- :onShowPersList="onShowPersListFun" --> <!-- :onShowPersList="onShowPersListFun" -->
<div class= "group w-full inline-flex absolute opacity-0 group-hover:opacity-100 transform group-hover:-translate-y-10 group-hover:translate-x-15 transition-all duration-300"> <div class= "group w-full inline-flex absolute opacity-0 group-hover:opacity-100 transform group-hover:-translate-y-10 group-hover:translate-x-15 transition-all duration-300">
<div class="w-full" <div class="w-full"
v-for="(item, index) in this.$store.state.mountedPersArr" :key="index + '-' + item.name" v-for="(item, index) in mountedPersonalities" :key="index + '-' + item.name"
ref="mountedPersonalities"> ref="mountedPersonalities">
<div v-if="index!=this.$store.state.config.active_personality_id" class="group items-center flex flex-row"> <div v-if="index!=personality_name" class="group items-center flex flex-row">
<button @click.prevent="onPersonalitySelected(item)" class="w-8 h-8"> <button @click.prevent="onPersonalitySelected(item)" class="w-8 h-8">
<img :src="bUrl + item.avatar" @error="personalityImgPlacehodler" <img :src="bUrl + item.avatar" @error="personalityImgPlacehodler"
class="w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary " class="w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary "
@ -424,12 +424,18 @@ export default {
installedModels() { installedModels() {
return this.$store.state.installedModels; return this.$store.state.installedModels;
}, },
mountedPersonalities() {
return this.$store.state.mountedPersArr;
},
binding_name(){ binding_name(){
return this.$store.state.config.binding_name return this.$store.state.config.binding_name
}, },
model_name(){ model_name(){
return this.$store.state.config.model_name return this.$store.state.config.model_name
}, },
personality_name(){
return this.$store.state.config.active_personality_id
},
config() { config() {
return this.$store.state.config; return this.$store.state.config;
}, },
@ -604,6 +610,9 @@ export default {
const res = await this.select_personality(pers) const res = await this.select_personality(pers)
console.log('pers is mounted', res) console.log('pers is mounted', res)
this.$store.dispatch('refreshMountedPersonalities');
await this.$store.dispatch('refreshConfig');
if (res && res.status && res.active_personality_id > -1) { if (res && res.status && res.active_personality_id > -1) {
this.$store.state.toast.showToast("Selected personality:\n" + pers.name, 4, true) this.$store.state.toast.showToast("Selected personality:\n" + pers.name, 4, true)

@ -1 +1 @@
Subproject commit fe46dddf82563c46a59107bd18ea4a86d6953551 Subproject commit d2613e270aa10f7e537aed79f7439f85ca90aecd