show only installed

This commit is contained in:
Saifeddine ALOUI 2023-09-01 12:09:09 +02:00
parent ff7897c763
commit c3d4e98c9f
4 changed files with 38 additions and 34 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">
<title>LoLLMS WebUI - Welcome</title>
<script type="module" crossorigin src="/assets/index-dab2104c.js"></script>
<link rel="stylesheet" href="/assets/index-24b81943.css">
<script type="module" crossorigin src="/assets/index-d3bfd912.js"></script>
<link rel="stylesheet" href="/assets/index-828b7c81.css">
</head>
<body>
<div id="app"></div>

View File

@ -1175,7 +1175,7 @@
</div>
<div>
<input v-bind="show_only_installed_models" class="m-2 p-2" type="checkbox" ref="only_installed">
<input v-model="show_only_installed_models" class="m-2 p-2" type="checkbox" ref="only_installed">
<label for="only_installed">Show only installed models</label>
</div>
<div v-if="searchModel">
@ -1187,7 +1187,7 @@
<div class="overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4"
:class="mzl_collapsed ? '' : 'max-h-96'">
<TransitionGroup name="list">
<model-entry ref="modelZoo" v-for="(model, index) in modelsFiltered"
<model-entry ref="modelZoo" v-for="(model, index) in show_only_installed_models?filter_installed(modelsFiltered):modelsFiltered"
:key="'index-' + index + '-' + model.title" :title="model.title" :icon="model.icon"
:path="model.path" :owner="model.owner" :owner_link="model.owner_link"
:license="model.license" :description="model.description"
@ -1212,7 +1212,7 @@
<div class="overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4"
:class="mzl_collapsed ? '' : 'max-h-96'">
<TransitionGroup name="list">
<model-entry ref="modelZoo" v-for="(model, index) in show_only_installed_models?installed_models:models"
<model-entry ref="modelZoo" v-for="(model, index) in show_only_installed_models?filter_installed(models):models"
:key="'index-' + index + '-' + model.title" :title="model.title" :icon="model.icon"
:path="model.path" :owner="model.owner" :owner_link="model.owner_link"
:license="model.license" :description="model.description"
@ -1906,6 +1906,10 @@ export default {
},
methods: {
filter_installed(models){
console.log("filtering")
return models.filter(element => element.isInstalled === true);
},
getVoices() {
// Fetch available voices from the SpeechSynthesis API
if ('speechSynthesis' in window) {