Skip to content

Commit

Permalink
Add color to E division and simple hyperlink recognition
Browse files Browse the repository at this point in the history
  • Loading branch information
sebneira committed Feb 1, 2015
1 parent e9e4710 commit 6c36028
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions web/CHANGELOG.md
Expand Up @@ -9,6 +9,7 @@
- Error control on replay upload
- No Queue button if no region is selected
- Color code on division and names
- Simple hyperlink recognition

### Changed
- Matching regions are deselected by default
Expand Down
2 changes: 1 addition & 1 deletion web/package.json
@@ -1,7 +1,7 @@
{
"name": "erosjs",
"private": true,
"version": "0.2.3b",
"version": "0.2.3c",
"author": "Starbow Dev team",
"description": "Starbow's matchmaking web client.",
"repository": {
Expand Down
9 changes: 8 additions & 1 deletion web/src/app/modules/eros-chat/directives.js
Expand Up @@ -105,6 +105,13 @@ angular.module('erosApp.chat', ['ngAudio'])
restrict: 'A',
link: function($scope, $elem, $attrs, $controller){
$elem.html($scope.message.message.replace(/@\w+/g, '<span username>'+'$&'+'</span>'));
$elem.html($scope.message.message.replace(/http\S*/g, function(match){
var rep = '<a href="'+match+'" target="_blank">';
rep += match.length > 40 ? match.slice(0,30)+'...'+match.slice(-6) : match;
rep += '</a>'

return rep;
}));
}
};
})
Expand Down Expand Up @@ -153,7 +160,7 @@ angular.module('erosApp.chat', ['ngAudio'])
return function(division){
switch(division) {
case 'E':
return "#888";
return "#9966cc";
break
case 'D':
return "#AB3E3E";
Expand Down

0 comments on commit 6c36028

Please sign in to comment.