added some fixes and installed

This commit is contained in:
AndzejsP 2023-06-23 10:18:37 +03:00
parent 33736a7020
commit b53cd92f7a
3 changed files with 85 additions and 66 deletions

6
web/package-lock.json generated
View File

@ -2745,9 +2745,9 @@
}
},
"node_modules/semver": {
"version": "7.5.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz",
"integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==",
"version": "7.5.3",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz",
"integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==",
"dev": true,
"dependencies": {
"lru-cache": "^6.0.0"

View File

@ -1,14 +1,13 @@
<template>
<div class=" items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer select-none"
@click.stop="toggleSelected" :class="selected ? ' border-primary-light' : 'border-transparent'">
<div :class="isTemplate ? 'opacity-50' : ''">
<!--
<div class="inline-flex items-center"> -->
@click.stop="toggleSelected" :class="selected ? ' border-primary-light' : 'border-transparent'"
:title="!binding.installed ? 'Not installed' : ''">
<div :class="!binding.installed ? 'opacity-50' : ''">
<div class="flex flex-row items-center gap-3 ">
<img ref="imgElement" :src="getImgUrl()" @error="defaultImg($event)" class="w-10 h-10 rounded-full object-fill text-blue-700">
<img ref="imgElement" :src="getImgUrl()" @error="defaultImg($event)"
class="w-10 h-10 rounded-full object-fill text-blue-700">
<h3 class="font-bold font-large text-lg truncate">
{{ binding.name }}
</h3>
@ -17,13 +16,22 @@
</div>
<!-- ADVANCED OPTIONS -->
<div class="flex-none gap-1">
<button type="button" title="Reinstall binding"
class="hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center " @click.stop="toggleReinstall">
<button v-if="!binding.installed" type="button" title="Not installed"
class="hover:text-red-600 duration-75 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center "
@click.stop="">
<i data-feather="slash" class="w-5"></i>
<span class="sr-only">Not installed</span>
</button>
<button v-if="binding.installed" type="button" title="Reinstall binding"
class="hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center "
@click.stop="toggleReinstall">
<i data-feather="tool" class="w-5"></i>
<span class="sr-only">Reinstall binding</span>
</button>
<button v-if="selected" type="button" title="Settings"
class="hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center " @click.stop="toggleSettings">
class="hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center "
@click.stop="toggleSettings">
<i data-feather="sliders" class="w-5"></i>
<span class="sr-only">Settings</span>
</button>
@ -65,7 +73,8 @@
<i data-feather="github" class="w-5 m-1"></i>
<b>Link:&nbsp;</b>
<a :href="binding.link" target="_blank" class="flex items-center hover:text-secondary duration-75 active:scale-90">
<a :href="binding.link" target="_blank"
class="flex items-center hover:text-secondary duration-75 active:scale-90">
{{ binding.link }}
</a>
</div>
@ -139,8 +148,8 @@ export default {
}
},
watch:{
selected(){
watch: {
selected() {
nextTick(() => {
feather.replace()

View File

@ -1,12 +1,14 @@
<template>
<div
class=" items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer active:scale-95 duration-75 select-none"
@click.stop="toggleSelected" :class="selected ? 'border-primary-light' : 'border-transparent'">
@click.stop="toggleSelected" :class="selected ? 'border-primary-light' : 'border-transparent'"
:title="!personality.installed ? 'Not installed' : ''">
<div :class="!personality.installed ? 'opacity-50' : ''">
<div class="flex flex-row items-center flex-shrink-0 gap-3">
<img ref="imgElement" :src="getImgUrl()" @error="defaultImg($event)"
class="w-10 h-10 rounded-full object-fill text-red-700" >
class="w-10 h-10 rounded-full object-fill text-red-700">
<!-- :class="personality.installed ? 'grayscale-0':'grayscale'" -->
<h3 class="font-bold font-large text-lg line-clamp-3">
{{ personality.name }}
@ -16,15 +18,23 @@
</div>
<!-- ADVANCED OPTIONS - NOT IMPLEMENTED -->
<div class="flex items-center">
<button v-if="!personality.installed" type="button" title="Not installed"
class="hover:text-red-600 duration-75 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center "
@click.stop="">
<i data-feather="slash" class="w-5"></i>
<span class="sr-only">Not installed</span>
</button>
<button v-if="selected" type="button" title="Settings"
class="hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center " @click.stop="toggleSettings">
class="hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center "
@click.stop="toggleSettings">
<i data-feather="sliders" class="w-5"></i>
<span class="sr-only">Settings</span>
</button>
<!-- BUTTON MOUNTED -->
<button type="button" @click.stop="toggleMounted"
class="inline-flex items-center px-5 py-2.5 text-sm font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800" :class="isMounted ? ' bg-red-700 rounded-lg hover:bg-red-800 focus:ring-red-300 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-800':''">
{{isMounted ? 'Unmount':'Mount'}}
class="inline-flex items-center px-5 py-2.5 text-sm font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
:class="isMounted ? ' bg-red-700 rounded-lg hover:bg-red-800 focus:ring-red-300 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-800' : ''">
{{ isMounted ? 'Unmount' : 'Mount' }}
</button>
@ -59,7 +69,7 @@
</div>
</div>
</div>
</template>
@ -75,15 +85,15 @@ export default {
onSelected: Function,
selected: Boolean,
onMounted: Function,
full_path:String,
onSettings:Function
full_path: String,
onSettings: Function
},
data() {
return {
isMounted: false,
name:this.personality.name
name: this.personality.name
};
},
mounted() {
@ -117,8 +127,8 @@ export default {
},
},
watch:{
selected(){
watch: {
selected() {
nextTick(() => {
feather.replace()