fix: subscription icon not rendered correctly

The computed property "icon" which holds the icon string to be rendered was overriding the <icon> component. Therefore, the component wasn't rendered at all, instead vue would render a html tag with the icon name.
This commit is contained in:
kolaente 2022-01-29 22:30:47 +01:00
parent c98ab42e75
commit b3697cb9bf
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
<template>
<x-button
variant="secondary"
:icon="icon"
:icon="iconName"
v-tooltip="tooltipText"
@click="changeSubscription"
:disabled="disabled || null"
@ -16,7 +16,7 @@
v-else
>
<span class="icon">
<icon :icon="icon"/>
<icon :icon="iconName"/>
</span>
{{ buttonText }}
</a>
@ -73,7 +73,7 @@ const tooltipText = computed(() => {
})
const buttonText = computed(() => props.subscription !== null ? t('task.subscription.unsubscribe') : t('task.subscription.subscribe'))
const icon = computed(() => props.subscription !== null ? ['far', 'bell-slash'] : 'bell')
const iconName = computed(() => props.subscription !== null ? ['far', 'bell-slash'] : 'bell')
const disabled = computed(() => {
if (props.subscription === null) {
return false