-
-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
35 additions
and
37 deletions.
There are no files selected for viewing
70 changes: 34 additions & 36 deletions
70
resources/js/components/gallery/albumModule/thumbs/ThumbFavourite.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,45 @@ | ||
<template> | ||
<div | ||
:class="{ | ||
'absolute top-0 right-0 flex justify-center items-center h-8 w-8 text-surface-0 text-2xl filter-shadow': true, | ||
'md:opacity-0 md:group-hover:opacity-50 md:transition-all md:ease-out': !props.isFavourite, | ||
}" | ||
> | ||
<span | ||
:class="{ | ||
pi: true, | ||
'pi-heart-fill': props.isFavourite, | ||
'pi-heart': !props.isFavourite, | ||
}" | ||
></span> | ||
</div> | ||
<div | ||
:class="{ | ||
'absolute top-0 right-0 flex justify-center items-center h-8 w-8 text-surface-0 text-2xl cursor-pointer': true, | ||
'opacity-0 md:opacity-0 md:hover:opacity-100 md:transition-all md:ease-out': !props.isFavourite, | ||
}" | ||
@click="propagateClick" | ||
> | ||
<span | ||
:class="{ | ||
pi: true, | ||
'pi-heart': props.isFavourite, | ||
'pi-heart-fill': !props.isFavourite, | ||
}" | ||
></span> | ||
</div> | ||
<div | ||
:class="{ | ||
'absolute top-0 right-0 flex justify-center items-center h-8 w-8 text-surface-0 text-2xl filter-shadow': true, | ||
'md:opacity-0 md:group-hover:opacity-50 md:transition-all md:ease-out': !props.isFavourite, | ||
}" | ||
> | ||
<span | ||
:class="{ | ||
pi: true, | ||
'pi-heart-fill': props.isFavourite, | ||
'pi-heart': !props.isFavourite, | ||
}" | ||
></span> | ||
</div> | ||
<div | ||
:class="{ | ||
'absolute top-0 right-0 flex justify-center items-center h-8 w-8 text-surface-0 text-2xl cursor-pointer': true, | ||
'opacity-0 md:opacity-0 md:hover:opacity-100 md:transition-all md:ease-out': !props.isFavourite, | ||
}" | ||
@click="propagateClick" | ||
> | ||
<span | ||
:class="{ | ||
pi: true, | ||
'pi-heart': props.isFavourite, | ||
'pi-heart-fill': !props.isFavourite, | ||
}" | ||
></span> | ||
</div> | ||
</template> | ||
<script setup lang="ts"> | ||
const props = defineProps<{ | ||
isFavourite: boolean; | ||
isFavourite: boolean; | ||
}>(); | ||
const emits = defineEmits<{ | ||
click: []; | ||
click: []; | ||
}>(); | ||
function propagateClick(e: MouseEvent) { | ||
e.stopPropagation(); | ||
emits('click'); | ||
e.stopPropagation(); | ||
emits("click"); | ||
} | ||
</script> | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters