Skip to content

Commit

Permalink
Disable unjoinable buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Unihedro committed Jun 19, 2016
1 parent 9fd3e27 commit 9513356
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ui/tournament/src/view/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ function withdraw(ctrl) {

function join(ctrl) {
return orJoinSpinner(ctrl, function() {
return m('button.button.right.text', {
class: ctrl.data.verdicts.accepted ? 'glowed' : '',
var joinable = ctrl.data.verdicts.accepted;
return m('button.button.right.text' + (joinable ? '' : '[disabled]'), {
class: joinable ? 'glowed' : '',
'data-icon': 'G',
onclick: ctrl.join
}, ctrl.trans('join'));
Expand Down

0 comments on commit 9513356

Please sign in to comment.