diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js index 7014a56c4..80fa68d35 100644 --- a/gui/default/syncthing/core/syncthingController.js +++ b/gui/default/syncthing/core/syncthingController.js @@ -2713,6 +2713,27 @@ angular.module('syncthing.core') } }, $scope.emitHTTPError); }; + + $scope.isFolderTabDisabled = function (tab) { + if (!$scope.currentFolder) { + return false; + } + if ($scope.currentFolder._editing === "new-ignores") { + return tab !== "ignores"; + } + if (tab === "ignores" && $scope.currentFolder._recvEnc) { + return true; + } + return false; + }; + + $scope.onFolderTabClick = function ($event, tab) { + if ($scope.isFolderTabDisabled(tab)) { + $event.preventDefault(); + $event.stopPropagation(); + return false; + } + }; function saveFolderIgnoresExisting() { if ($scope.ignores.disabled) { diff --git a/gui/default/syncthing/folder/editFolderModalView.html b/gui/default/syncthing/folder/editFolderModalView.html index fc6faa74c..95221d734 100644 --- a/gui/default/syncthing/folder/editFolderModalView.html +++ b/gui/default/syncthing/folder/editFolderModalView.html @@ -2,11 +2,46 @@