Skip to content

Commit

Permalink
Hide unsubscribe button on channel list if this is set in parental co…
Browse files Browse the repository at this point in the history
…ntrols. (#2906)

* Hide unsubscribe button on channel list if this is set in parental
controls.

* Fix github linting errors

* Removed trailing whitespace.

* Reverted yarn.lock change

* Remove package-lock.json

Co-authored-by: Simon Epstein <simon.epstein@67bricks.com>
  • Loading branch information
elshimone and simonepstein authored Dec 4, 2022
1 parent cabe6dd commit a433c04
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/renderer/views/SubscribedChannels/SubscribedChannels.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ export default Vue.extend({
}
},

hideUnsubscribeButton: function() {
return this.$store.getters.getHideUnsubscribeButton
},

locale: function () {
return this.$i18n.locale.replace('_', '-')
},
Expand Down
5 changes: 4 additions & 1 deletion src/renderer/views/SubscribedChannels/SubscribedChannels.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
>
{{ channel.name }}
</div>
<div class="unsubscribeContainer">
<div
v-if="!hideUnsubscribeButton"
class="unsubscribeContainer"
>
<ft-button
:label="$t('Channels.Unsubscribe')"
background-color="var(--search-bar-color)"
Expand Down

0 comments on commit a433c04

Please sign in to comment.