From 0a16d0ec884d281e4183cb0a03660f4e586c7554 Mon Sep 17 00:00:00 2001 From: Charles Lehner Date: Sat, 28 Jun 2014 23:58:43 -0700 Subject: [PATCH] Fix "become DJ" button text --- browser/controllers/RoomCtrl.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/browser/controllers/RoomCtrl.js b/browser/controllers/RoomCtrl.js index ef65327..eb655b7 100755 --- a/browser/controllers/RoomCtrl.js +++ b/browser/controllers/RoomCtrl.js @@ -31,6 +31,7 @@ module.exports = Ractive.extend({ template: require("../templates/room.html"), data: { + djs: [], currentTab: null, currentTrack: null, activeDJ: null, @@ -45,12 +46,16 @@ module.exports = Ractive.extend({ return subtract(this.get('users'), this.get('djs')); }, + isDJ: function() { + return this.get('djs').indexOf(this.get('me')) != -1; + }, + isActiveDJ: function() { return this.get('activeDJ') == this.get('me'); }, joinText: function() { - return this.get('isActiveDJ') ? 'step down' : 'become a dj'; + return this.get('isDJ') ? 'step down' : 'become a dj'; }, msgPlaceholder: function() {