diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/components/cards/cardDetails.jade | 5 | ||||
-rw-r--r-- | client/components/cards/cardDetails.js | 5 | ||||
-rw-r--r-- | client/components/forms/forms.styl | 5 | ||||
-rw-r--r-- | client/components/lists/listBody.js | 4 |
4 files changed, 15 insertions, 4 deletions
diff --git a/client/components/cards/cardDetails.jade b/client/components/cards/cardDetails.jade index 3a144557..60b20a8a 100644 --- a/client/components/cards/cardDetails.jade +++ b/client/components/cards/cardDetails.jade @@ -89,7 +89,10 @@ template(name="cardDetails") h2 {{ _ 'activity'}} .material-toggle-switch span.toggle-switch-title {{_ 'hide-system-messages'}} - input.toggle-switch(type="checkbox" id="toggleButton") + if hiddenSystemMessages + input.toggle-switch(type="checkbox" id="toggleButton" checked="checked" disabled) + else + input.toggle-switch(type="checkbox" id="toggleButton") label.toggle-label(for="toggleButton") if currentUser.isBoardMember +commentForm diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index d622c912..ed23b359 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -28,6 +28,11 @@ BlazeComponent.extendComponent({ return card.findWatcher(Meteor.userId()); }, + hiddenSystemMessages() { + console.log('doo:', Meteor.user().hasHiddenSystemMessages()); + return Meteor.user().hasHiddenSystemMessages(); + }, + canModifyCard() { return Meteor.user() && Meteor.user().isBoardMember() && !Meteor.user().isCommentOnly(); }, diff --git a/client/components/forms/forms.styl b/client/components/forms/forms.styl index 4c8ff7b0..1947c11d 100644 --- a/client/components/forms/forms.styl +++ b/client/components/forms/forms.styl @@ -668,11 +668,11 @@ button left: 20px background-color: #179588 -.toggle-switch:disabled ~ .toggle-label +.toggle-switch:checked:disabled ~ .toggle-label background-color: #d5d5d5 pointer-events: none - &after + &:after background-color: #bcbdbc .toggle-switch @@ -682,6 +682,7 @@ button margin: 0 0.5em display: flex + @media screen and (max-width: 800px) .edit-controls, .add-controls diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js index 011c92c8..794f33c2 100644 --- a/client/components/lists/listBody.js +++ b/client/components/lists/listBody.js @@ -84,7 +84,9 @@ BlazeComponent.extendComponent({ evt.preventDefault(); Utils.goBoardId(Session.get('currentBoard')); } else { - $('.toggle-switch').prop('checked', false); + if (!Meteor.user().hasHiddenSystemMessages()) { + $('.toggle-switch').prop('checked', false); + } } }, |