diff options
author | Lauri Ojansivu <x@xet7.org> | 2019-11-19 14:09:36 +0200 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2019-11-19 14:09:36 +0200 |
commit | 351d4767d7e93c90ac798769d6071da8730d834f (patch) | |
tree | 47b9e49342f17affce947c840566b9c03a630aab /client/components/cards | |
parent | f595120e7203fdeee1a6c899adb948807e84b672 (diff) | |
download | wekan-351d4767d7e93c90ac798769d6071da8730d834f.tar.gz wekan-351d4767d7e93c90ac798769d6071da8730d834f.tar.bz2 wekan-351d4767d7e93c90ac798769d6071da8730d834f.zip |
When logged in, use database for setting, so that changes are
immediate. Only on public board use cookies.
Comment out Collapse CSS that is not in use.
Thanks to xet7 !
Diffstat (limited to 'client/components/cards')
-rw-r--r-- | client/components/cards/minicard.js | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/client/components/cards/minicard.js b/client/components/cards/minicard.js index 5caea709..a9f92dec 100644 --- a/client/components/cards/minicard.js +++ b/client/components/cards/minicard.js @@ -33,21 +33,31 @@ BlazeComponent.extendComponent({ Template.minicard.helpers({ showDesktopDragHandles() { - import { Cookies } from 'meteor/ostrio:cookies'; - const cookies = new Cookies(); - if (cookies.has('showDesktopDragHandles')) { - return true; + currentUser = Meteor.user(); + if (currentUser) { + return (currentUser.profile || {}).showDesktopDragHandles; } else { - return false; + import { Cookies } from 'meteor/ostrio:cookies'; + const cookies = new Cookies(); + if (cookies.has('showDesktopDragHandles')) { + return true; + } else { + return false; + } } }, hiddenMinicardLabelText() { - import { Cookies } from 'meteor/ostrio:cookies'; - const cookies = new Cookies(); - if (cookies.has('hiddenMinicardLabelText')) { - return true; + currentUser = Meteor.user(); + if (currentUser) { + return (currentUser.profile || {}).hiddenMinicardLabelText; } else { - return false; + import { Cookies } from 'meteor/ostrio:cookies'; + const cookies = new Cookies(); + if (cookies.has('hiddenMinicardLabelText')) { + return true; + } else { + return false; + } } }, }); |