mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-06-22 08:50:08 +00:00
added picture
This commit is contained in:
BIN
web/src/assets/default_model.png
Normal file
BIN
web/src/assets/default_model.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 245 KiB |
@ -2,7 +2,8 @@
|
|||||||
<div class="flex items-center p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer"
|
<div class="flex items-center 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'">
|
@click.stop="toggleSelected" :class="selected ? ' border-primary-light' : 'border-transparent'">
|
||||||
<div class="flex-shrink-0">
|
<div class="flex-shrink-0">
|
||||||
<i :class="`fas ${icon} text-xl`"></i>
|
<img :src="getImgUrl()" @error="defaultImg($event)" class="w-10 h-10 rounded-lg object-fill text-red-700">
|
||||||
|
<!-- <i :class="`fas ${icon} text-xl`"></i> -->
|
||||||
</div>
|
</div>
|
||||||
<div v-if="model.isCustomModel">
|
<div v-if="model.isCustomModel">
|
||||||
<h3 class="font-bold font-large text-lg">
|
<h3 class="font-bold font-large text-lg">
|
||||||
@ -70,6 +71,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import { nextTick } from 'vue'
|
import { nextTick } from 'vue'
|
||||||
import feather from 'feather-icons'
|
import feather from 'feather-icons'
|
||||||
|
import defaultImgPlaceholder from "../assets/default_model.png"
|
||||||
|
const bUrl = import.meta.env.VITE_GPT4ALL_API_BASEURL
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
title: String,
|
title: String,
|
||||||
@ -102,6 +105,17 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getImgUrl() {
|
||||||
|
|
||||||
|
if (this.icon === '/images/default_model.png'){
|
||||||
|
return defaultImgPlaceholder
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.icon
|
||||||
|
},
|
||||||
|
defaultImg(event) {
|
||||||
|
event.target.src = defaultImgPlaceholder
|
||||||
|
},
|
||||||
toggleInstall() {
|
toggleInstall() {
|
||||||
if (this.isInstalled) {
|
if (this.isInstalled) {
|
||||||
this.uninstalling = true;
|
this.uninstalling = true;
|
||||||
|
Reference in New Issue
Block a user