Split node ID's into multiple parts/chunks for readability

Helps with manual entry.
This commit is contained in:
Veeti Paananen
2014-05-13 07:58:04 +03:00
parent 1338b0a2f8
commit 870ce57005
3 changed files with 12 additions and 5 deletions

View File

@@ -309,6 +309,7 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) {
$scope.configInSync = false;
$('#editNode').modal('hide');
nodeCfg = $scope.currentNode;
nodeCfg.NodeID = nodeCfg.NodeID.replace(/ /g, '').trim();
nodeCfg.Addresses = nodeCfg.AddressesStr.split(',').map(function (x) { return x.trim(); });
done = false;
@@ -537,6 +538,12 @@ syncthing.filter('alwaysNumber', function () {
};
});
syncthing.filter('chunkID', function () {
return function (input) {
return input.match(/.{1,6}/g).join(' ');
}
});
syncthing.directive('optionEditor', function () {
return {
restrict: 'C',