From 351d4767d7e93c90ac798769d6071da8730d834f Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Tue, 19 Nov 2019 14:09:36 +0200 Subject: 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 ! --- client/components/cards/minicard.js | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'client/components/cards/minicard.js') 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; + } } }, }); -- cgit v1.2.3-1-g7c22