This commit is contained in:
Saifeddine ALOUI 2023-11-12 02:35:45 +01:00
parent 7e92d1b86b
commit ba71aaadc1
3 changed files with 45 additions and 65 deletions

File diff suppressed because one or more lines are too long

2
web/dist/index.html vendored
View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LoLLMS WebUI - Welcome</title>
<script type="module" crossorigin src="/assets/index-aec6f74b.js"></script>
<script type="module" crossorigin src="/assets/index-9df9245b.js"></script>
<link rel="stylesheet" href="/assets/index-14b749f0.css">
</head>
<body>

View File

@ -2,7 +2,8 @@
<div
class="relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none"
:class="computed_classes"
:title="model.name">
:title="model.name"
@click.prevent="toggleSelected()">
<!-- CUSTOM MODEL VIEW -->
<div class="flex flex-row" v-if="model.isCustomModel">
<div class="max-w-[300px] overflow-x-auto">
@ -29,17 +30,6 @@
</button>
Custom model
</div>
<div v-if="model.isInstalled">
<div v-if="model.selected" @click.stop="toggleSelected" class="cursor-pointer" style="background-color: white;">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path d="M9 16.17l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41z"/>
</svg>
</div>
<div v-else @click.stop="toggleSelected" class="cursor-pointer" style="background-color: white;">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
</svg>
</div>
</div>
<div>
<button v-if="model.isInstalled" title="Delete file from disk" type="button" @click.stop="toggleInstall"
class="inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 rounded-lg dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900">
@ -119,17 +109,6 @@
<div class="grow">
<!-- EMPTY SPACE FILLER -->
</div>
<div v-if="model.isInstalled">
<div v-if="model.selected" @click.stop="toggleSelected" class="cursor-pointer" style="background-color: white;">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path d="M9 16.17l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41z"/>
</svg>
</div>
<div v-else @click.stop="toggleSelected" class="cursor-pointer" style="background-color: white;">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
</svg>
</div>
</div>
<InteractiveMenu :commands="commandsList" :force_position=2 title="Menu">
</InteractiveMenu>
@ -329,6 +308,7 @@ export default {
},
toggleSelected(force=false) {
this.onSelected(this,force)
model.selected = true;
nextTick(() => {
feather.replace()
})
@ -363,9 +343,9 @@ export default {
return 'border-transparent'
}
if(this.selected){
return 'border-4 border-gray-200 bg-primary'
return 'border-4 border-gray-200 bg-primary cursor-pointer'
}
return 'border-0 border-primary bg-primary'
return 'border-0 border-primary bg-primary cursor-pointer'
},
commandsList(){
let main_menu = [