mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 14:50:56 +00:00
gui: Pretty theme names
This commit is contained in:
parent
46c07bb207
commit
4b6c2d0d3d
@ -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();
|
||||
});
|
||||
|
@ -139,9 +139,9 @@
|
||||
|
||||
<div class="form-group" ng-if="system.themes.length > 1">
|
||||
<label>GUI Theme</label>
|
||||
<select class="form-control" ng-model="tmpGUI.theme" ng->
|
||||
<option ng-repeat="theme in system.themes" value="{{ theme }}">
|
||||
{{ theme.charAt(0).toUpperCase() + theme.slice(1) }}
|
||||
<select class="form-control" ng-model="tmpGUI.theme">
|
||||
<option ng-repeat="theme in system.themes.sort()" value="{{ theme }}">
|
||||
{{ themeName(theme) }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user