refactor(front): userfollow button

This commit is contained in:
ArneBo 2025-01-30 00:24:19 +01:00
parent 7c8caf328f
commit 1a053458db
1 changed files with 5 additions and 2 deletions

View File

@ -5,6 +5,8 @@ import { computed } from 'vue'
import { useI18n } from 'vue-i18n'
import { useStore } from '~/store'
import Button from '~/components/ui/Button.vue'
const { t } = useI18n()
interface Events {
@ -36,11 +38,12 @@ const toggle = () => {
</script>
<template>
<button
<Button
secondary
:class="['ui', 'pink', {'inverted': isApproved || isPending}, {'favorited': isApproved}, 'icon', 'labeled', 'button']"
:icon="isPending ? 'bi-heart' : 'bi-heart-fill'"
@click.stop="toggle"
>
<i class="heart icon" />
<span v-if="isApproved">
{{ t('components.audio.LibraryFollowButton.button.unfollow') }}
</span>