|
@@ -119,6 +119,13 @@ Users.attachSchema(
|
|
type: String,
|
|
type: String,
|
|
optional: true,
|
|
optional: true,
|
|
},
|
|
},
|
|
|
|
+ 'profile.showDesktopDragHandles': {
|
|
|
|
+ /**
|
|
|
|
+ * does the user want to hide system messages?
|
|
|
|
+ */
|
|
|
|
+ type: Boolean,
|
|
|
|
+ optional: true,
|
|
|
|
+ },
|
|
'profile.hiddenSystemMessages': {
|
|
'profile.hiddenSystemMessages': {
|
|
/**
|
|
/**
|
|
* does the user want to hide system messages?
|
|
* does the user want to hide system messages?
|
|
@@ -126,6 +133,13 @@ Users.attachSchema(
|
|
type: Boolean,
|
|
type: Boolean,
|
|
optional: true,
|
|
optional: true,
|
|
},
|
|
},
|
|
|
|
+ 'profile.hiddenMinicardLabelText': {
|
|
|
|
+ /**
|
|
|
|
+ * does the user want to hide minicard label texts?
|
|
|
|
+ */
|
|
|
|
+ type: Boolean,
|
|
|
|
+ optional: true,
|
|
|
|
+ },
|
|
'profile.initials': {
|
|
'profile.initials': {
|
|
/**
|
|
/**
|
|
* initials of the user
|
|
* initials of the user
|
|
@@ -184,7 +198,6 @@ Users.attachSchema(
|
|
allowedValues: [
|
|
allowedValues: [
|
|
'board-view-lists',
|
|
'board-view-lists',
|
|
'board-view-swimlanes',
|
|
'board-view-swimlanes',
|
|
- 'board-view-collapse',
|
|
|
|
'board-view-cal',
|
|
'board-view-cal',
|
|
],
|
|
],
|
|
},
|
|
},
|
|
@@ -382,18 +395,10 @@ Users.helpers({
|
|
}
|
|
}
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
- //hasSortBy() {
|
|
|
|
- // if use doesn't have dragHandle, then we can let user to choose sort list by different order
|
|
|
|
- //return this.hasShowDesktopDragHandles();
|
|
|
|
- // return false;
|
|
|
|
- /*
|
|
|
|
- if (typeof currentUser === 'undefined' || typeof currentUser === 'null') {
|
|
|
|
- return false;
|
|
|
|
- } else {
|
|
|
|
- return this.hasShowDesktopDragHandles();
|
|
|
|
- }
|
|
|
|
- */
|
|
|
|
- //},
|
|
|
|
|
|
+ hasSortBy() {
|
|
|
|
+ // if use doesn't have dragHandle, then we can let user to choose sort list by different order
|
|
|
|
+ return !this.hasShowDesktopDragHandles();
|
|
|
|
+ },
|
|
getListSortBy() {
|
|
getListSortBy() {
|
|
return this._getListSortBy()[0];
|
|
return this._getListSortBy()[0];
|
|
},
|
|
},
|
|
@@ -414,11 +419,21 @@ Users.helpers({
|
|
return _.contains(notifications, activityId);
|
|
return _.contains(notifications, activityId);
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ hasShowDesktopDragHandles() {
|
|
|
|
+ const profile = this.profile || {};
|
|
|
|
+ return profile.showDesktopDragHandles || false;
|
|
|
|
+ },
|
|
|
|
+
|
|
hasHiddenSystemMessages() {
|
|
hasHiddenSystemMessages() {
|
|
const profile = this.profile || {};
|
|
const profile = this.profile || {};
|
|
return profile.hiddenSystemMessages || false;
|
|
return profile.hiddenSystemMessages || false;
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ hasHiddenMinicardLabelText() {
|
|
|
|
+ const profile = this.profile || {};
|
|
|
|
+ return profile.hiddenMinicardLabelText || false;
|
|
|
|
+ },
|
|
|
|
+
|
|
getEmailBuffer() {
|
|
getEmailBuffer() {
|
|
const { emailBuffer = [] } = this.profile || {};
|
|
const { emailBuffer = [] } = this.profile || {};
|
|
return emailBuffer;
|
|
return emailBuffer;
|
|
@@ -440,11 +455,8 @@ Users.helpers({
|
|
},
|
|
},
|
|
|
|
|
|
getLimitToShowCardsCount() {
|
|
getLimitToShowCardsCount() {
|
|
- currentUser = Meteor.user();
|
|
|
|
- if (currentUser) {
|
|
|
|
- const profile = this.profile || {};
|
|
|
|
- return profile.showCardsCountAt;
|
|
|
|
- }
|
|
|
|
|
|
+ const profile = this.profile || {};
|
|
|
|
+ return profile.showCardsCountAt;
|
|
},
|
|
},
|
|
|
|
|
|
getName() {
|
|
getName() {
|
|
@@ -524,6 +536,13 @@ Users.mutations({
|
|
},
|
|
},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
+ toggleDesktopHandles(value = false) {
|
|
|
|
+ return {
|
|
|
|
+ $set: {
|
|
|
|
+ 'profile.showDesktopDragHandles': !value,
|
|
|
|
+ },
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
|
|
toggleSystem(value = false) {
|
|
toggleSystem(value = false) {
|
|
return {
|
|
return {
|
|
@@ -533,6 +552,14 @@ Users.mutations({
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ toggleLabelText(value = false) {
|
|
|
|
+ return {
|
|
|
|
+ $set: {
|
|
|
|
+ 'profile.hiddenMinicardLabelText': !value,
|
|
|
|
+ },
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+
|
|
addNotification(activityId) {
|
|
addNotification(activityId) {
|
|
return {
|
|
return {
|
|
$addToSet: {
|
|
$addToSet: {
|
|
@@ -597,10 +624,18 @@ Meteor.methods({
|
|
check(value, String);
|
|
check(value, String);
|
|
Meteor.user().setListSortBy(value);
|
|
Meteor.user().setListSortBy(value);
|
|
},
|
|
},
|
|
|
|
+ toggleDesktopDragHandles() {
|
|
|
|
+ const user = Meteor.user();
|
|
|
|
+ user.toggleDesktopHandles(user.hasShowDesktopDragHandles());
|
|
|
|
+ },
|
|
toggleSystemMessages() {
|
|
toggleSystemMessages() {
|
|
const user = Meteor.user();
|
|
const user = Meteor.user();
|
|
user.toggleSystem(user.hasHiddenSystemMessages());
|
|
user.toggleSystem(user.hasHiddenSystemMessages());
|
|
},
|
|
},
|
|
|
|
+ toggleMinicardLabelText() {
|
|
|
|
+ const user = Meteor.user();
|
|
|
|
+ user.toggleLabelText(user.hasHiddenMinicardLabelText());
|
|
|
|
+ },
|
|
changeLimitToShowCardsCount(limit) {
|
|
changeLimitToShowCardsCount(limit) {
|
|
check(limit, Number);
|
|
check(limit, Number);
|
|
Meteor.user().setShowCardsCountAt(limit);
|
|
Meteor.user().setShowCardsCountAt(limit);
|