aboutsummaryrefslogtreecommitdiff
path: root/resources/vue/components/blubber/ThreadSubscriber.vue
blob: 28ad7e00059a7fc81defaf5a119e3e6850e68188 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<template>
    <div class="context_info">
        <a
            href="#"
            @click.prevent="onClick"
            class="followunfollow"
            :class="{ unfollowed: !followed }"
            :title="$gettext('Benachrichtigungen für diese Konversation abstellen.')"
        >
            <StudipIcon v-if="!followed" shape="decline" class="text-bottom"></StudipIcon>
            <StudipIcon v-else shape="notification2" class="text-bottom"></StudipIcon>
            {{ $gettext('Benachrichtigungen aktiviert') }}
        </a>
    </div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';

export default defineComponent({
    emits: ['subscribe-thread'],
    props: {
        followed: {
            type: Boolean,
            required: true,
        },
    },
    methods: {
        onClick() {
            this.$emit('subscribe-thread', !this.followed);
        },
    },
});
</script>