Add Worker role.

Add more Font Awesome icons.
Fix browser console errors when editing user profile name etc.

Thanks to xet7 !

Closes #2788
This commit is contained in:
Lauri Ojansivu 2020-01-03 06:49:35 +02:00
parent 0709b5abc8
commit 2bf004120d
37 changed files with 683 additions and 320 deletions

View file

@ -24,18 +24,14 @@ Utils = {
currentUser = Meteor.user();
if (currentUser) {
return (currentUser.profile || {}).boardView;
} else if (cookies.get('boardView') === 'board-view-lists') {
return 'board-view-lists';
} else if (cookies.get('boardView') === 'board-view-swimlanes') {
return 'board-view-swimlanes';
} else if (cookies.get('boardView') === 'board-view-cal') {
return 'board-view-cal';
} else {
if (cookies.get('boardView') === 'board-view-lists') {
return 'board-view-lists';
} else if (
cookies.get('boardView') === 'board-view-swimlanes'
) {
return 'board-view-swimlanes';
} else if (cookies.get('boardView') === 'board-view-cal') {
return 'board-view-cal';
} else {
return false;
}
return false;
}
},
@ -43,8 +39,8 @@ Utils = {
goBoardId(_id) {
const board = Boards.findOne(_id);
return (
board
&& FlowRouter.go('board', {
board &&
FlowRouter.go('board', {
id: board._id,
slug: board.slug,
})
@ -55,8 +51,8 @@ Utils = {
const card = Cards.findOne(_id);
const board = Boards.findOne(card.boardId);
return (
board
&& FlowRouter.go('card', {
board &&
FlowRouter.go('card', {
cardId: card._id,
boardId: board._id,
slug: board.slug,
@ -227,8 +223,8 @@ Utils = {
};
if (
'ontouchstart' in window
|| (window.DocumentTouch && document instanceof window.DocumentTouch)
'ontouchstart' in window ||
(window.DocumentTouch && document instanceof window.DocumentTouch)
) {
return true;
}
@ -249,8 +245,8 @@ Utils = {
calculateTouchDistance(touchA, touchB) {
return Math.sqrt(
Math.pow(touchA.screenX - touchB.screenX, 2)
+ Math.pow(touchA.screenY - touchB.screenY, 2),
Math.pow(touchA.screenX - touchB.screenX, 2) +
Math.pow(touchA.screenY - touchB.screenY, 2),
);
},
@ -267,9 +263,9 @@ Utils = {
});
$(document).on('touchend', selector, function(e) {
if (
touchStart
&& lastTouch
&& Utils.calculateTouchDistance(touchStart, lastTouch) <= 20
touchStart &&
lastTouch &&
Utils.calculateTouchDistance(touchStart, lastTouch) <= 20
) {
e.preventDefault();
const clickEvent = document.createEvent('MouseEvents');