Changed public board changing Swimlanes/Lists/Calendar view

and changing Hide minicard label text
from using cookies to using browser localStorage.

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2020-10-28 15:45:37 +02:00
parent a463f2a855
commit 460b1d3a66
9 changed files with 51 additions and 63 deletions

View file

@ -1,5 +1,3 @@
import { Cookies } from 'meteor/ostrio:cookies';
const cookies = new Cookies();
const { calculateIndexData } = Utils;
let swimlaneColors;
@ -35,7 +33,7 @@ Template.swimlaneHeader.helpers({
currentUser = Meteor.user();
if (currentUser) {
return (currentUser.profile || {}).showDesktopDragHandles;
} else if (cookies.has('showDesktopDragHandles')) {
} else if (window.localStorage.getItem('showDesktopDragHandles')) {
return true;
} else {
return false;

View file

@ -1,5 +1,3 @@
import { Cookies } from 'meteor/ostrio:cookies';
const cookies = new Cookies();
const { calculateIndex } = Utils;
function currentListIsInThisSwimlane(swimlaneId) {
@ -102,7 +100,7 @@ function initSortable(boardComponent, $listsDom) {
if (currentUser) {
showDesktopDragHandles = (currentUser.profile || {})
.showDesktopDragHandles;
} else if (cookies.has('showDesktopDragHandles')) {
} else if (window.localStorage.getItem('showDesktopDragHandles')) {
showDesktopDragHandles = true;
} else {
showDesktopDragHandles = false;
@ -178,7 +176,7 @@ BlazeComponent.extendComponent({
if (currentUser) {
showDesktopDragHandles = (currentUser.profile || {})
.showDesktopDragHandles;
} else if (cookies.has('showDesktopDragHandles')) {
} else if (window.localStorage.getItem('showDesktopDragHandles')) {
showDesktopDragHandles = true;
} else {
showDesktopDragHandles = false;
@ -269,7 +267,7 @@ Template.swimlane.helpers({
currentUser = Meteor.user();
if (currentUser) {
return (currentUser.profile || {}).showDesktopDragHandles;
} else if (cookies.has('showDesktopDragHandles')) {
} else if (window.localStorage.getItem('showDesktopDragHandles')) {
return true;
} else {
return false;