summaryrefslogtreecommitdiffstats
path: root/client/components/boards
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/boards')
-rw-r--r--client/components/boards/boardHeader.jade3
-rw-r--r--client/components/boards/boardHeader.js2
-rw-r--r--client/components/boards/boardsList.jade26
-rw-r--r--client/components/boards/boardsList.js18
-rw-r--r--client/components/boards/boardsList.styl9
5 files changed, 50 insertions, 8 deletions
diff --git a/client/components/boards/boardHeader.jade b/client/components/boards/boardHeader.jade
index cb86e9bb..a0160382 100644
--- a/client/components/boards/boardHeader.jade
+++ b/client/components/boards/boardHeader.jade
@@ -117,6 +117,9 @@ template(name="boardChangeTitlePopup")
label
| {{_ 'title'}}
input.js-board-name(type="text" value=title autofocus)
+ label
+ | {{_ 'description'}}
+ textarea.js-board-desc= description
input.primary.wide(type="submit" value="{{_ 'rename'}}")
template(name="archiveBoardPopup")
diff --git a/client/components/boards/boardHeader.js b/client/components/boards/boardHeader.js
index 92d5f6d4..3dc6d754 100644
--- a/client/components/boards/boardHeader.js
+++ b/client/components/boards/boardHeader.js
@@ -18,8 +18,10 @@ Template.boardMenuPopup.events({
Template.boardChangeTitlePopup.events({
submit(evt, tpl) {
const newTitle = tpl.$('.js-board-name').val().trim();
+ const newDesc = tpl.$('.js-board-desc').val().trim();
if (newTitle) {
this.rename(newTitle);
+ this.setDesciption(newDesc);
Popup.close();
}
evt.preventDefault();
diff --git a/client/components/boards/boardsList.jade b/client/components/boards/boardsList.jade
index 11333eee..7099cdc9 100644
--- a/client/components/boards/boardsList.jade
+++ b/client/components/boards/boardsList.jade
@@ -3,11 +3,23 @@ template(name="boardList")
ul.board-list.clearfix
each boards
li(class="{{#if isStarred}}starred{{/if}}" class=colorClass)
- a.js-open-board(href="{{pathFor 'board' id=_id slug=slug}}")
- span.details
- span.board-list-item-name= title
- i.fa.js-star-board(
- class="fa-star{{#if isStarred}} is-star-active{{else}}-o{{/if}}"
- title="{{_ 'star-board-title'}}")
+ if isInvited
+ .board-list-item
+ span.details
+ span.board-list-item-name= title
+ i.fa.js-star-board(
+ class="fa-star{{#if isStarred}} is-star-active{{else}}-o{{/if}}"
+ title="{{_ 'star-board-title'}}")
+ p.board-list-item-desc {{_ 'just-invited'}}
+ button.js-accept-invite.primary {{_ 'accept'}}
+ button.js-decline-invite {{_ 'decline'}}
+ else
+ a.js-open-board.board-list-item(href="{{pathFor 'board' id=_id slug=slug}}")
+ span.details
+ span.board-list-item-name= title
+ i.fa.js-star-board(
+ class="fa-star{{#if isStarred}} is-star-active{{else}}-o{{/if}}"
+ title="{{_ 'star-board-title'}}")
+ p.board-list-item-desc= description
li.js-add-board
- a.label {{_ 'add-board'}}
+ a.board-list-item.label {{_ 'add-board'}}
diff --git a/client/components/boards/boardsList.js b/client/components/boards/boardsList.js
index 1a2d3c9a..131adf9d 100644
--- a/client/components/boards/boardsList.js
+++ b/client/components/boards/boardsList.js
@@ -17,6 +17,11 @@ BlazeComponent.extendComponent({
return user && user.hasStarred(this.currentData()._id);
},
+ isInvited() {
+ const user = Meteor.user();
+ return user && user.isInvitedTo(this.currentData()._id);
+ },
+
events() {
return [{
'click .js-add-board': Popup.open('createBoard'),
@@ -25,6 +30,19 @@ BlazeComponent.extendComponent({
Meteor.user().toggleBoardStar(boardId);
evt.preventDefault();
},
+ 'click .js-accept-invite'() {
+ const boardId = this.currentData()._id;
+ Meteor.user().removeInvite(boardId);
+ },
+ 'click .js-decline-invite'() {
+ const boardId = this.currentData()._id;
+ Meteor.call('quitBoard', boardId, (err, ret) => {
+ if (!err && ret) {
+ Meteor.user().removeInvite(boardId);
+ FlowRouter.go('home');
+ }
+ });
+ },
}];
},
}).register('boardList');
diff --git a/client/components/boards/boardsList.styl b/client/components/boards/boardsList.styl
index 9978fab8..e24940a0 100644
--- a/client/components/boards/boardsList.styl
+++ b/client/components/boards/boardsList.styl
@@ -14,7 +14,7 @@ $spaceBetweenTiles = 16px
.fa-star-o
opacity: 1
- a
+ .board-list-item
background-color: #999
color: #f6f6f6
height: 90px
@@ -40,6 +40,13 @@ $spaceBetweenTiles = 16px
font-weight: 400
line-height: 22px
+ .board-list-item-desc
+ color: rgba(255, 255, 255, .5)
+ display: block
+ font-size: 10px
+ font-weight: 400
+ line-height: 18px
+
.js-add-board
text-align:center