Split node ID's into multiple parts/chunks for readability
Helps with manual entry.
This commit is contained in:
parent
1338b0a2f8
commit
870ce57005
File diff suppressed because one or more lines are too long
@ -309,6 +309,7 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) {
|
|||||||
$scope.configInSync = false;
|
$scope.configInSync = false;
|
||||||
$('#editNode').modal('hide');
|
$('#editNode').modal('hide');
|
||||||
nodeCfg = $scope.currentNode;
|
nodeCfg = $scope.currentNode;
|
||||||
|
nodeCfg.NodeID = nodeCfg.NodeID.replace(/ /g, '').trim();
|
||||||
nodeCfg.Addresses = nodeCfg.AddressesStr.split(',').map(function (x) { return x.trim(); });
|
nodeCfg.Addresses = nodeCfg.AddressesStr.split(',').map(function (x) { return x.trim(); });
|
||||||
|
|
||||||
done = false;
|
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 () {
|
syncthing.directive('optionEditor', function () {
|
||||||
return {
|
return {
|
||||||
restrict: 'C',
|
restrict: 'C',
|
||||||
|
|||||||
@ -362,8 +362,8 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="nodeID">Node ID</label>
|
<label for="nodeID">Node ID</label>
|
||||||
<input ng-if="!editingExisting" id="nodeID" class="form-control" type="text" ng-model="currentNode.NodeID"></input>
|
<input ng-if="!editingExisting" id="nodeID" class="form-control" type="text" ng-model="currentNode.NodeID"></input>
|
||||||
<div ng-if="editingExisting" class="well well-sm">{{currentNode.NodeID}}</div>
|
<div ng-if="editingExisting" class="well well-sm">{{currentNode.NodeID | chunkID}}</div>
|
||||||
<p class="help-block">The node ID can be found in the "Add Node" dialog on the other node.</p>
|
<p class="help-block">The node ID can be found in the "Add Node" dialog on the other node. Spaces are ignored.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="name">Name</label>
|
<label for="name">Name</label>
|
||||||
@ -378,7 +378,7 @@
|
|||||||
</form>
|
</form>
|
||||||
<div ng-show="!editingExisting">
|
<div ng-show="!editingExisting">
|
||||||
When adding a new node, keep in mind that <em>this node</em> must be added on the other side too. The Node ID of this node is:
|
When adding a new node, keep in mind that <em>this node</em> must be added on the other side too. The Node ID of this node is:
|
||||||
<pre>{{myID}}</pre>
|
<pre>{{myID | chunkID}}</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user