summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorJakob Borg <jakob@nym.se>2014-05-18 12:05:17 +0200
committerJakob Borg <jakob@nym.se>2014-05-18 12:05:31 +0200
commitbbefcef53bf2ef420bf7a68253fea5d223d37a44 (patch)
tree03ce6ca7868c13312dc25cb0c893ce8e13cff1b3 /gui
parent729b0143e18108daea4f2767c8779461ec576209 (diff)
Allow node IDs with spaces/dashes in config. Use dashes in GUI. (ref #230)
Diffstat (limited to 'gui')
-rw-r--r--gui/app.js4
-rw-r--r--gui/index.html8
2 files changed, 6 insertions, 6 deletions
diff --git a/gui/app.js b/gui/app.js
index fa58db77f1..44a85a1505 100644
--- a/gui/app.js
+++ b/gui/app.js
@@ -460,7 +460,7 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) {
$scope.init();
setInterval($scope.refresh, refreshInterval);
- setInterval(heartbeat, 450);
+ setInterval(heartbeat, 650);
});
function nodeCompare(a, b) {
@@ -581,7 +581,7 @@ syncthing.filter('chunkID', function () {
var parts = input.match(/.{1,6}/g);
if (!parts)
return "";
- return parts.join(' ');
+ return parts.join('-');
}
});
diff --git a/gui/index.html b/gui/index.html
index bda69f5604..a1323e7d89 100644
--- a/gui/index.html
+++ b/gui/index.html
@@ -368,10 +368,10 @@
<form role="form" name="nodeEditor">
<div class="form-group" ng-class="{'has-error': nodeEditor.nodeID.$invalid && nodeEditor.nodeID.$dirty}">
<label for="nodeID">Node ID</label>
- <input ng-if="!editingExisting" name="nodeID" id="nodeID" class="form-control" type="text" ng-model="currentNode.NodeID" required></input>
- <div ng-if="editingExisting" class="well well-sm">{{currentNode.NodeID | chunkID}}</div>
+ <input ng-if="!editingExisting" name="nodeID" id="nodeID" class="form-control text-monospace" type="text" ng-model="currentNode.NodeID" required></input>
+ <div ng-if="editingExisting" class="well well-sm text-monospace">{{currentNode.NodeID | chunkID}}</div>
<p class="help-block">
- <span ng-if="nodeEditor.nodeID.$valid || nodeEditor.nodeID.$pristine">The node ID to enter here can be found in the "Add Node" dialog on the other node. Spaces are ignored.</span>
+ <span ng-if="nodeEditor.nodeID.$valid || nodeEditor.nodeID.$pristine">The node ID to enter here can be found in the "Add Node" dialog on the other node. Spaces and dashes are optional (ignored).</span>
<span ng-if="nodeEditor.nodeID.$error.required && nodeEditor.nodeID.$dirty">The node ID cannot be blank.</span>
</p>
</div>
@@ -388,7 +388,7 @@
</form>
<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:
- <pre>{{myID | chunkID}}</pre>
+ <div class="well well-sm text-monospace">{{myID | chunkID}}</div>
</div>
</div>
<div class="modal-footer">