gui: Pretty theme names

This commit is contained in:
Audrius Butkevicius
2016-03-27 06:40:50 +00:00
committed by Jakob Borg
parent 46c07bb207
commit 4b6c2d0d3d
3 changed files with 12 additions and 6 deletions

View File

@@ -1551,6 +1551,12 @@ angular.module('syncthing.core')
return randomStringFromCharset(5, charset) + "-" + randomStringFromCharset(5, charset);
};
$scope.themeName = function (theme) {
return theme.replace('-', ' ').replace(/(?:^|\s)\S/g, function (a) {
return a.toUpperCase();
});
};
// pseudo main. called on all definitions assigned
initController();
});