toggle favourites refactor

This commit is contained in:
Čarodej
2022-02-28 17:38:18 +01:00
parent 8ae24a9a6e
commit 30025271c2
5 changed files with 46 additions and 94 deletions

View File

@@ -1,12 +1,11 @@
<template>
<div
:class="{
'pointer-events-none opacity-50': (disabledById && disabledById.data.id === nodes.id) || !disableId,
'pointer-events-none opacity-50': (disabledById && disabledById.data.id === nodes.id) || !disableId || (isRootDepth && !nodes.folders.length),
'mb-2.5': isRootDepth,
}"
>
<div
:class="{ 'is-disabled-item': false }"
:style="indent"
class="relative relative flex cursor-pointer select-none items-center whitespace-nowrap py-2 px-1.5 transition-all duration-150"
>
@@ -53,7 +52,7 @@
<b
@click="getFolder"
class="ml-3 inline-block overflow-x-hidden text-ellipsis whitespace-nowrap text-xs font-bold transition-all duration-150"
:class="{ 'text-theme': isSelectedItem }"
:class="{'text-theme': isSelectedItem }"
>
{{ nodes.name }}
</b>