diff options
| author | Shpuld Shpuldson <shp@cock.li> | 2020-06-17 11:23:32 +0300 |
|---|---|---|
| committer | Shpuld Shpuldson <shp@cock.li> | 2020-06-17 11:23:32 +0300 |
| commit | f8cf92a01f952f344ee4c3b7df153b2ffdb7988f (patch) | |
| tree | d1f20bc99722d2b94aeef772acd59083145d71ac /src/components/domain_mute_card/domain_mute_card.js | |
| parent | 064b59812c715d60526727d42c124375a2bc89d5 (diff) | |
| parent | 57626c125d0477716a638854c4243ee0fde96923 (diff) | |
Merge branch 'develop' into kPherox/pleroma-fe-iss-149/profile-fields-display
Diffstat (limited to 'src/components/domain_mute_card/domain_mute_card.js')
| -rw-r--r-- | src/components/domain_mute_card/domain_mute_card.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/components/domain_mute_card/domain_mute_card.js b/src/components/domain_mute_card/domain_mute_card.js new file mode 100644 index 00000000..f234dcb0 --- /dev/null +++ b/src/components/domain_mute_card/domain_mute_card.js @@ -0,0 +1,26 @@ +import ProgressButton from '../progress_button/progress_button.vue' + +const DomainMuteCard = { + props: ['domain'], + components: { + ProgressButton + }, + computed: { + user () { + return this.$store.state.users.currentUser + }, + muted () { + return this.user.domainMutes.includes(this.domain) + } + }, + methods: { + unmuteDomain () { + return this.$store.dispatch('unmuteDomain', this.domain) + }, + muteDomain () { + return this.$store.dispatch('muteDomain', this.domain) + } + } +} + +export default DomainMuteCard |
