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