12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <div ng-controller="ChatCtrl">
- <div class="page-header">
- <h1 ng-show="service.isConnected()">Welcome <small>You are playing as {{service.username}}</small></h1>
- <h1 ng-hide="service.isConnected()">Welcome <small>login to play</small></h1>
- </div>
- <div ng-show="!service.isConnected()" class="row">
- <div id="login" class="offset4 span6">
- <form ng-show="service.status == 'disconnected'">
- <input id="username" name="username" class="input-small" type="text" ng-model="username" placeholder="Username">
- <br>
- <br>
- <button class="btn" type="submit" ng-click="service.connect(username); username=''">{{service.hasRoom() ? 'Join Room' : 'Create New Room'}}</button>
- </form>
- </div>
- </div>
- <div ng-show="service.isConnected()" class="row">
- <div class="span10" id="main">
- <div id="messages">
- <div class="message {{message.kind}} {{message.user == chat.username ? 'me' : ''}}" ng-repeat="message in chat.messages">
- <span>{{message.user}}</span>
- <p>{{message.message}}</p>
- </div>
- </div>
- <textarea ng-model="text" id="talk" ng-keypress="onType($event)"></textarea>
- </div>
- <div class="span4" ng-controller="GameCtrl">
- <button class="btn" ng-show="game.pendingRound" ng-click="game.startRound()">Start</button>
- <div ng-if="game.roundRunning()">
- <h2><ng-pluralize count="game.timer.count" when="{'0': 'Time\'s up!', 'one': '1 second', 'other': '{} seconds'}" /></h2>
- <h2><ng-pluralize count="game.points" when="{'one': '1 point', 'other': '{} points'}" /></h2>
- <hr>
- </div>
- <div ng-if="game.roundRunning()">
- <h3 ng-show="game.isPlayer()">you are the giver</button>
- <h3 ng-show="game.isMonitor()">you are a monitor</button>
- <h3 ng-show="game.isGuesser()">you are a guesser</button>
- <button class="btn" ng-show="game.isPlayer()" ng-click="game.pass()">Pass</button>
- <button class="btn" ng-show="game.isMonitor()" ng-click="game.taboo()">Uh-uh!</button>
- <button class="btn" ng-show="game.isMonitor() || game.isPlayer()" ng-click="game.correct()">Correct</button>
- </div>
- <div ng-show="game.card">
- <h2>Card</h2>
- <h3>{{game.card.word}}</h3>
- <ul class="taboo">
- <li ng-repeat="word in game.card.taboo">{{word}}</li>
- </ul>
- </div>
- <h2>Team A</h2>
- <ul class="members">
- <li ng-repeat="member in game.teamA.members">{{member}}</li>
- </ul>
- <h2>Team B</h2>
- <ul class="members">
- <li ng-repeat="member in game.teamB.members">{{member}}</li>
- </ul>
- </div>
- </div>
- </div>
|