mirror of
https://github.com/wekan/wekan.git
synced 2026-01-06 17:48:49 +01:00
Move every Meteor.user() to the ReactiveCache
This commit is contained in:
parent
6e1ef3d94a
commit
5e3a9dc059
42 changed files with 211 additions and 252 deletions
|
|
@ -91,9 +91,6 @@ Template.boardOrgRow.helpers({
|
|||
orgData() {
|
||||
return Org.findOne(this.orgId);
|
||||
},
|
||||
currentUser(){
|
||||
return Meteor.user();
|
||||
},
|
||||
});
|
||||
|
||||
Template.boardOrgName.helpers({
|
||||
|
|
@ -153,9 +150,6 @@ Template.boardTeamRow.helpers({
|
|||
teamData() {
|
||||
return Team.findOne(this.teamId);
|
||||
},
|
||||
currentUser(){
|
||||
return Meteor.user();
|
||||
},
|
||||
});
|
||||
|
||||
Template.boardTeamName.helpers({
|
||||
|
|
@ -182,20 +176,20 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
|
||||
isSelected() {
|
||||
const userProfile = Meteor.user().profile;
|
||||
const userProfile = ReactiveCache.getCurrentUser().profile;
|
||||
const avatarUrl = userProfile && userProfile.avatarUrl;
|
||||
const currentAvatarUrl = `${this.currentData().link()}?auth=false&brokenIsFine=true`;
|
||||
return avatarUrl === currentAvatarUrl;
|
||||
},
|
||||
|
||||
noAvatarUrl() {
|
||||
const userProfile = Meteor.user().profile;
|
||||
const userProfile = ReactiveCache.getCurrentUser().profile;
|
||||
const avatarUrl = userProfile && userProfile.avatarUrl;
|
||||
return !avatarUrl;
|
||||
},
|
||||
|
||||
setAvatar(avatarUrl) {
|
||||
Meteor.user().setAvatarUrl(avatarUrl);
|
||||
ReactiveCache.getCurrentUser().setAvatarUrl(avatarUrl);
|
||||
},
|
||||
|
||||
setError(error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue