mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
change Meteor.user() to ReactiveCache.getCurrentUser()
- see also: https://github.com/wekan/wekan/issues/5000
This commit is contained in:
parent
4801e26b2f
commit
bff96f6ae2
6 changed files with 10 additions and 10 deletions
|
@ -196,7 +196,7 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
|
||||
listWidth() {
|
||||
const user = Meteor.user();
|
||||
const user = ReactiveCache.getCurrentUser();
|
||||
const list = Template.currentData();
|
||||
return user.getListWidth(list.boardId, list._id);
|
||||
},
|
||||
|
|
|
@ -362,7 +362,7 @@ BlazeComponent.extendComponent({
|
|||
listWidthValue() {
|
||||
const list = Template.currentData();
|
||||
const board = list.boardId;
|
||||
return Meteor.user().getListWidth(board, list._id);
|
||||
return ReactiveCache.getCurrentUser().getListWidth(board, list._id);
|
||||
},
|
||||
|
||||
events() {
|
||||
|
|
|
@ -224,7 +224,7 @@ BlazeComponent.extendComponent({
|
|||
swimlaneHeightValue() {
|
||||
const swimlane = this.currentData();
|
||||
const board = swimlane.boardId;
|
||||
return Meteor.user().getSwimlaneHeight(board, swimlane._id);
|
||||
return ReactiveCache.getCurrentUser().getSwimlaneHeight(board, swimlane._id);
|
||||
},
|
||||
|
||||
events() {
|
||||
|
|
|
@ -225,7 +225,7 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
|
||||
swimlaneHeight() {
|
||||
const user = Meteor.user();
|
||||
const user = ReactiveCache.getCurrentUser();
|
||||
const swimlane = Template.currentData();
|
||||
const height = user.getSwimlaneHeight(swimlane.boardId, swimlane._id);
|
||||
return height == -1 ? "auto" : (height + "px");
|
||||
|
@ -288,7 +288,7 @@ BlazeComponent.extendComponent({
|
|||
|
||||
Template.swimlane.helpers({
|
||||
canSeeAddList() {
|
||||
return Meteor.user().isBoardAdmin();
|
||||
return ReactiveCache.getCurrentUser().isBoardAdmin();
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -325,7 +325,7 @@ Template.changeSettingsPopup.helpers({
|
|||
});
|
||||
},
|
||||
startDayOfWeek() {
|
||||
currentUser = Meteor.user();
|
||||
currentUser = ReactiveCache.getCurrentUser();
|
||||
if (currentUser) {
|
||||
return currentUser.getStartDayOfWeek();
|
||||
} else {
|
||||
|
@ -343,7 +343,7 @@ Template.changeSettingsPopup.events({
|
|||
return ret;
|
||||
},
|
||||
'click .js-toggle-desktop-drag-handles'() {
|
||||
currentUser = Meteor.user();
|
||||
const currentUser = ReactiveCache.getCurrentUser();
|
||||
if (currentUser) {
|
||||
Meteor.call('toggleDesktopDragHandles');
|
||||
} else if (window.localStorage.getItem('showDesktopDragHandles')) {
|
||||
|
@ -375,7 +375,7 @@ Template.changeSettingsPopup.events({
|
|||
templateInstance.$('#start-day-of-week').val(),
|
||||
10,
|
||||
);
|
||||
const currentUser = Meteor.user();
|
||||
const currentUser = ReactiveCache.getCurrentUser();
|
||||
if (isNaN(minLimit) || minLimit < -1) {
|
||||
minLimit = -1;
|
||||
}
|
||||
|
|
|
@ -1248,14 +1248,14 @@ Meteor.methods({
|
|||
check(boardId, String);
|
||||
check(listId, String);
|
||||
check(width, Number);
|
||||
const user = Meteor.user();
|
||||
const user = ReactiveCache.getCurrentUser();
|
||||
user.setListWidth(boardId, listId, width);
|
||||
},
|
||||
applySwimlaneHeight(boardId, swimlaneId, height) {
|
||||
check(boardId, String);
|
||||
check(swimlaneId, String);
|
||||
check(height, Number);
|
||||
const user = Meteor.user();
|
||||
const user = ReactiveCache.getCurrentUser();
|
||||
user.setSwimlaneHeight(boardId, swimlaneId, height);
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue