mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-02-20 09:16:15 +00:00
added template not usable
This commit is contained in:
parent
6e17cfaf0b
commit
17184cc7ea
@ -2,50 +2,52 @@
|
||||
<div class=" items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer"
|
||||
@click.stop="toggleSelected" :class="selected ? ' border-primary-light' : 'border-transparent'">
|
||||
|
||||
|
||||
<div class="flex flex-row items-center flex-shrink-0 gap-3">
|
||||
<img :src="getImgUrl()" @error="defaultImg($event)" class="w-10 h-10 rounded-full object-fill text-red-700">
|
||||
<h3 class="font-bold font-large text-lg line-clamp-3">
|
||||
{{ binding.name }}
|
||||
</h3>
|
||||
<div :class="isTemplate ? 'opacity-50' : ''">
|
||||
|
||||
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="flex flex-row items-center flex-shrink-0 gap-3">
|
||||
<img :src="getImgUrl()" @error="defaultImg($event)" class="w-10 h-10 rounded-full object-fill text-red-700">
|
||||
<h3 class="font-bold font-large text-lg line-clamp-3">
|
||||
{{ binding.name }}
|
||||
</h3>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="">
|
||||
|
||||
<div class="flex items-center">
|
||||
<i data-feather="user" class="w-5 m-1"></i>
|
||||
<b>Author: </b>
|
||||
<div class="flex items-center">
|
||||
<i data-feather="user" class="w-5 m-1"></i>
|
||||
<b>Author: </b>
|
||||
|
||||
{{ binding.author }}
|
||||
{{ binding.author }}
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<i data-feather="folder" class="w-5 m-1"></i>
|
||||
<b>Folder: </b>
|
||||
|
||||
{{ binding.folder }}
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<i data-feather="git-merge" class="w-5 m-1"></i>
|
||||
<b>Version: </b>
|
||||
{{ binding.version }}
|
||||
</div>
|
||||
<a :href="binding.link" target="_blank" class="flex items-center">
|
||||
<i data-feather="github" class="w-5 m-1"></i>
|
||||
<b>Link: </b>
|
||||
{{ binding.link }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<i data-feather="folder" class="w-5 m-1"></i>
|
||||
<b>Folder: </b>
|
||||
<i data-feather="info" class="w-5 m-1"></i>
|
||||
<b>Description: </b><br>
|
||||
</div>
|
||||
<p class="mx-1 opacity-80 line-clamp-3" :title="binding.description">{{ binding.description }}</p>
|
||||
|
||||
|
||||
{{ binding.folder }}
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<i data-feather="git-merge" class="w-5 m-1"></i>
|
||||
<b>Version: </b>
|
||||
{{ binding.version }}
|
||||
</div>
|
||||
<a :href="binding.link" target="_blank" class="flex items-center">
|
||||
<i data-feather="github" class="w-5 m-1"></i>
|
||||
<b>Link: </b>
|
||||
{{ binding.link }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<i data-feather="info" class="w-5 m-1"></i>
|
||||
<b>Description: </b><br>
|
||||
</div>
|
||||
<p class="mx-1 opacity-80 line-clamp-3" :title="binding.description">{{ binding.description }}</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -59,11 +61,12 @@ export default {
|
||||
props: {
|
||||
binding: {},
|
||||
onSelected: Function,
|
||||
selected: Boolean
|
||||
selected: Boolean,
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
isTemplate: false
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@ -72,6 +75,10 @@ export default {
|
||||
|
||||
|
||||
})
|
||||
|
||||
this.getStatus()
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
getImgUrl() {
|
||||
@ -83,7 +90,15 @@ export default {
|
||||
toggleSelected() {
|
||||
this.onSelected(this)
|
||||
},
|
||||
getStatus() {
|
||||
if (this.binding.folder === 'backend_template' || this.binding.folder === 'binding_template') {
|
||||
this.isTemplate = true
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -771,6 +771,12 @@ export default {
|
||||
socket.emit('uninstall_model', { path: model_object.path });
|
||||
},
|
||||
onSelectedBinding(binding_object) {
|
||||
|
||||
if(binding_object.binding.folder ==='backend_template' || binding_object.binding.folder==='binding_template'){
|
||||
this.$refs.toast.showToast("Cannot select template", 4, false)
|
||||
|
||||
return
|
||||
}
|
||||
this.update_binding(binding_object.binding.folder)
|
||||
//console.log('lol',binding_object)
|
||||
},
|
||||
@ -951,7 +957,7 @@ export default {
|
||||
const res = await axios.get("/" + endpoint);
|
||||
|
||||
if (res) {
|
||||
|
||||
|
||||
return res.data
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user