mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-16 10:28:49 -07:00
Don't offer to delete this node (fixes #144)
This commit is contained in:
parent
d53b193e09
commit
aa78fbb09d
File diff suppressed because one or more lines are too long
@ -252,6 +252,7 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) {
|
|||||||
$scope.editNode = function (nodeCfg) {
|
$scope.editNode = function (nodeCfg) {
|
||||||
$scope.currentNode = $.extend({}, nodeCfg);
|
$scope.currentNode = $.extend({}, nodeCfg);
|
||||||
$scope.editingExisting = true;
|
$scope.editingExisting = true;
|
||||||
|
$scope.editingSelf = (nodeCfg.NodeID == $scope.myID);
|
||||||
$scope.currentNode.AddressesStr = nodeCfg.Addresses.join(', ');
|
$scope.currentNode.AddressesStr = nodeCfg.Addresses.join(', ');
|
||||||
$('#editNode').modal({backdrop: 'static', keyboard: true});
|
$('#editNode').modal({backdrop: 'static', keyboard: true});
|
||||||
};
|
};
|
||||||
@ -259,6 +260,7 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) {
|
|||||||
$scope.addNode = function () {
|
$scope.addNode = function () {
|
||||||
$scope.currentNode = {AddressesStr: 'dynamic'};
|
$scope.currentNode = {AddressesStr: 'dynamic'};
|
||||||
$scope.editingExisting = false;
|
$scope.editingExisting = false;
|
||||||
|
$scope.editingSelf = false;
|
||||||
$('#editNode').modal({backdrop: 'static', keyboard: true});
|
$('#editNode').modal({backdrop: 'static', keyboard: true});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -382,7 +382,7 @@
|
|||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-primary" ng-click="saveNode()">Save</button>
|
<button type="button" class="btn btn-primary" ng-click="saveNode()">Save</button>
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||||
<button ng-if="editingExisting" type="button" class="btn btn-danger pull-left" ng-click="deleteNode()">Delete</button>
|
<button ng-if="editingExisting && !editingSelf" type="button" class="btn btn-danger pull-left" ng-click="deleteNode()">Delete</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user