From 99922feb3b1bf1afe7a99eab0af082580208077b Mon Sep 17 00:00:00 2001 From: Audrius Butkevicius Date: Fri, 2 Dec 2016 21:07:02 +0000 Subject: [PATCH] gui: Disable device removal when we know it will be reintroduced Skip-check: pr-build-windows GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3762 --- gui/default/syncthing/core/syncthingController.js | 7 +++++++ gui/default/syncthing/device/editDeviceModalView.html | 11 ++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js index b60f6822..a6a57abf 100755 --- a/gui/default/syncthing/core/syncthingController.js +++ b/gui/default/syncthing/core/syncthingController.js @@ -1071,6 +1071,13 @@ angular.module('syncthing.core') $scope.editDevice = function (deviceCfg) { $scope.currentDevice = $.extend({}, deviceCfg); $scope.editingExisting = true; + $scope.willBeReintroducedBy = undefined; + if (deviceCfg.introducedBy) { + var introducerDevice = $scope.findDevice(deviceCfg.introducedBy); + if (introducerDevice && introducerDevice.introducer) { + $scope.willBeReintroducedBy = $scope.deviceName(introducerDevice); + } + } $scope.currentDevice._addressesStr = deviceCfg.addresses.join(', '); $scope.currentDevice.selectedFolders = {}; $scope.deviceFolders($scope.currentDevice).forEach(function (folder) { diff --git a/gui/default/syncthing/device/editDeviceModalView.html b/gui/default/syncthing/device/editDeviceModalView.html index 8c692fc7..5f596b38 100644 --- a/gui/default/syncthing/device/editDeviceModalView.html +++ b/gui/default/syncthing/device/editDeviceModalView.html @@ -75,8 +75,13 @@ - +
+ + +