mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 04:57:07 -04:00
Use database when logged in. Continued.
Thanks to xet7 !
This commit is contained in:
parent
975258ef39
commit
115d23f929
5 changed files with 19 additions and 17 deletions
|
@ -199,7 +199,8 @@ BlazeComponent.extendComponent({
|
|||
let showDesktopDragHandles = false;
|
||||
currentUser = Meteor.user();
|
||||
if (currentUser) {
|
||||
showDesktopDragHandles = (currentUser.profile || {}).showDesktopDragHandles;
|
||||
showDesktopDragHandles = (currentUser.profile || {})
|
||||
.showDesktopDragHandles;
|
||||
} else {
|
||||
if (cookies.has('showDesktopDragHandles')) {
|
||||
showDesktopDragHandles = true;
|
||||
|
|
|
@ -122,7 +122,8 @@ BlazeComponent.extendComponent({
|
|||
let showDesktopDragHandles = false;
|
||||
currentUser = Meteor.user();
|
||||
if (currentUser) {
|
||||
showDesktopDragHandles = (currentUser.profile || {}).showDesktopDragHandles;
|
||||
showDesktopDragHandles = (currentUser.profile || {})
|
||||
.showDesktopDragHandles;
|
||||
} else {
|
||||
if (cookies.has('showDesktopDragHandles')) {
|
||||
showDesktopDragHandles = true;
|
||||
|
|
|
@ -713,13 +713,11 @@ BlazeComponent.extendComponent({
|
|||
.data()._id;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (Utils.boardView() === 'board-view-swimlanes') {
|
||||
this.swimlaneId = this.parentComponent()
|
||||
.parentComponent()
|
||||
.parentComponent()
|
||||
.data()._id;
|
||||
}
|
||||
} else if (Utils.boardView() === 'board-view-swimlanes') {
|
||||
this.swimlaneId = this.parentComponent()
|
||||
.parentComponent()
|
||||
.parentComponent()
|
||||
.data()._id;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -102,7 +102,8 @@ function initSortable(boardComponent, $listsDom) {
|
|||
let showDesktopDragHandles = false;
|
||||
currentUser = Meteor.user();
|
||||
if (currentUser) {
|
||||
showDesktopDragHandles = (currentUser.profile || {}).showDesktopDragHandles;
|
||||
showDesktopDragHandles = (currentUser.profile || {})
|
||||
.showDesktopDragHandles;
|
||||
} else {
|
||||
import { Cookies } from 'meteor/ostrio:cookies';
|
||||
const cookies = new Cookies();
|
||||
|
@ -203,7 +204,8 @@ BlazeComponent.extendComponent({
|
|||
let showDesktopDragHandles = false;
|
||||
currentUser = Meteor.user();
|
||||
if (currentUser) {
|
||||
showDesktopDragHandles = (currentUser.profile || {}).showDesktopDragHandles;
|
||||
showDesktopDragHandles = (currentUser.profile || {})
|
||||
.showDesktopDragHandles;
|
||||
} else {
|
||||
import { Cookies } from 'meteor/ostrio:cookies';
|
||||
const cookies = new Cookies();
|
||||
|
|
|
@ -10,9 +10,9 @@ Utils = {
|
|||
cookies.set('boardView', 'board-view-lists'); //true
|
||||
} else if (view === 'board-view-swimlanes') {
|
||||
cookies.set('boardView', 'board-view-swimlanes'); //true
|
||||
//} else if (view === 'board-view-collapse') {
|
||||
// cookies.set('boardView', 'board-view-swimlane'); //true
|
||||
// cookies.set('collapseSwimlane', 'true'); //true
|
||||
//} else if (view === 'board-view-collapse') {
|
||||
// cookies.set('boardView', 'board-view-swimlane'); //true
|
||||
// cookies.set('collapseSwimlane', 'true'); //true
|
||||
} else if (view === 'board-view-cal') {
|
||||
cookies.set('boardView', 'board-view-cal'); //true
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ Utils = {
|
|||
boardView() {
|
||||
currentUser = Meteor.user();
|
||||
if (currentUser) {
|
||||
return (currentUser.profile || {}).boardView
|
||||
return (currentUser.profile || {}).boardView;
|
||||
} else {
|
||||
import { Cookies } from 'meteor/ostrio:cookies';
|
||||
const cookies = new Cookies();
|
||||
|
@ -40,8 +40,8 @@ Utils = {
|
|||
//&& !cookies.has('collapseSwimlane')
|
||||
) {
|
||||
return 'board-view-swimlanes';
|
||||
//} else if (cookies.has('collapseSwimlane')) {
|
||||
// return 'board-view-swimlanes';
|
||||
//} else if (cookies.has('collapseSwimlane')) {
|
||||
// return 'board-view-swimlanes';
|
||||
} else if (cookies.get('boardView') === 'board-view-cal') {
|
||||
return 'board-view-cal';
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue