refactor(front): userfollow button
This commit is contained in:
parent
7c8caf328f
commit
1a053458db
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue