Show node name in title/header (fixes #221)

This commit is contained in:
Jakob Borg
2014-05-16 18:42:22 +02:00
parent 958c39ef5f
commit b60251b960
3 changed files with 18 additions and 6 deletions

View File

@@ -230,6 +230,18 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) {
return nodeCfg.NodeID.substr(0, 6);
};
$scope.thisNodeName = function () {
var nodes = $scope.thisNode();
if (typeof nodes === 'undefined' || nodes.length != 1) {
return "(unknown node)";
}
var nodeCfg = nodes[0];
if (nodeCfg.Name) {
return nodeCfg.Name;
}
return nodeCfg.NodeID.substr(0, 6);
};
$scope.editSettings = function () {
$('#settings').modal({backdrop: 'static', keyboard: true});
}