Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,7 @@ node_modules
.lock-wscript

### Webpack
dist/
dist/

### OS X files
/**/.DS_Store
4 changes: 2 additions & 2 deletions src/game_board/game_board.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
ng-class="{'selected': info.selected, 'targetable': doingAction && targets.indexOf(info.id) !== -1}">{{info.name}}</h4>
<ul style="list-style: none outside none; margin: 0; padding: 0;">
<li ng-repeat="(name, value) in info.properties">
<b>{{name}}</b>: {{value}}
<b>{{name | formatResourceName}}</b>: {{value}}
</li>
<li><b>CARDS: </b>{{info.zones.Hand.length()}}</li>
<li><b>Cards: </b>{{info.zones.Hand.length()}}</li>
</ul>
<!-- Action buttons -->
<div class="player-actions">
Expand Down
6 changes: 6 additions & 0 deletions src/game_board/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,10 @@ module.exports = angular.module('cardshifter.gameBoard', [ngRoute, ngAnimate, se
replace: true,
template: require('../card_model/card_template.html')
};
})
.filter('formatResourceName', function() {
return function(input, scope) {
input = input.replace(/_/g, ' ');
return input.substring(0, 1).toUpperCase() + input.substring(1).toLowerCase();
}
});
2 changes: 1 addition & 1 deletion src/server_interface/server_interface.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

// checks if the string begins with either ws:// or wss://
var wsProtocolFinder = /ws(s)*:\/\//;
var wsProtocolFinder = /ws(s)?:\/\//;
var SOCKET_OPEN = 1;

var MAIN_LOBBY = 1;
Expand Down