mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-06-22 08:50:08 +00:00
Added model listing and install (WIP)
This commit is contained in:
39
web/src/components/ModelEntry.vue
Normal file
39
web/src/components/ModelEntry.vue
Normal file
@ -0,0 +1,39 @@
|
||||
<template>
|
||||
<div class="flex items-center space-x-4 py-4">
|
||||
<div class="flex-shrink-0">
|
||||
<i :class="`fas ${icon} text-xl`"></i>
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
<h3 class="font-bold text-lg">{{ title }}</h3>
|
||||
<p class="text-gray-600">{{ description }}</p>
|
||||
</div>
|
||||
<div class="flex-shrink-0">
|
||||
<button
|
||||
class="px-4 py-2 rounded-md text-white font-bold transition-colors duration-300"
|
||||
:class="[isInstalled ? 'bg-red-500 hover:bg-red-600' : 'bg-green-500 hover:bg-green-600']"
|
||||
@click="toggleInstall"
|
||||
>
|
||||
{{ isInstalled ? 'Uninstall' : 'Install' }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
title: String,
|
||||
icon: String,
|
||||
path: String,
|
||||
description: String,
|
||||
isInstalled: Boolean,
|
||||
onToggleInstall: Function,
|
||||
},
|
||||
methods: {
|
||||
toggleInstall() {
|
||||
this.onToggleInstall(this.isInstalled, this.path);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user