diff --git a/gui/default/index.html b/gui/default/index.html index 9f63c4ab9..6178f75aa 100644 --- a/gui/default/index.html +++ b/gui/default/index.html @@ -533,7 +533,7 @@  Shared With - + @@ -835,7 +835,7 @@  Folders - + diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js index 721a5a437..d802895a6 100755 --- a/gui/default/syncthing/core/syncthingController.js +++ b/gui/default/syncthing/core/syncthingController.js @@ -2366,11 +2366,15 @@ angular.module('syncthing.core') + '&device=' + encodeURIComponent(deviceID)); }; - $scope.deviceNameMarkUnaccepted = function (deviceID, folderID) { + $scope.deviceNameMarkRemoteState = function (deviceID, folderID) { var name = $scope.deviceName($scope.devices[deviceID]); // Add footnote if sharing was not accepted on the remote device - if (deviceID in $scope.completion && folderID in $scope.completion[deviceID] && $scope.completion[deviceID][folderID].remoteState == 'notSharing') { - name += '1'; + if (deviceID in $scope.completion && folderID in $scope.completion[deviceID]) { + if ($scope.completion[deviceID][folderID].remoteState == 'notSharing') { + name += '1'; + } else if ($scope.completion[deviceID][folderID].remoteState == 'paused') { + name += '2'; + } } return name; }; @@ -2379,7 +2383,7 @@ angular.module('syncthing.core') var names = []; folderCfg.devices.forEach(function (device) { if (device.deviceID !== $scope.myID) { - names.push($scope.deviceNameMarkUnaccepted(device.deviceID, folderCfg.id)); + names.push($scope.deviceNameMarkRemoteState(device.deviceID, folderCfg.id)); } }); names.sort(); @@ -2397,6 +2401,17 @@ angular.module('syncthing.core') return false; }; + $scope.folderHasPausedDevices = function (folderCfg) { + for (var deviceID in $scope.completion) { + if (deviceID in $scope.devices + && folderCfg.id in $scope.completion[deviceID] + && $scope.completion[deviceID][folderCfg.id].remoteState == 'paused') { + return true; + } + } + return false; + }; + $scope.deviceFolders = function (deviceCfg) { var folders = []; $scope.folderList().forEach(function (folder) { @@ -2418,11 +2433,15 @@ angular.module('syncthing.core') return label && label.length > 0 ? label : folderID; }; - $scope.folderLabelMarkUnaccepted = function (folderID, deviceID) { + $scope.folderLabelMarkRemoteState = function (folderID, deviceID) { var label = $scope.folderLabel(folderID); // Add footnote if sharing was not accepted on the remote device - if (deviceID in $scope.completion && folderID in $scope.completion[deviceID] && $scope.completion[deviceID][folderID].remoteState == 'notSharing') { - label += '1'; + if (deviceID in $scope.completion && folderID in $scope.completion[deviceID]) { + if ($scope.completion[deviceID][folderID].remoteState == 'notSharing') { + label += '1'; + } else if ($scope.completion[deviceID][folderID].remoteState == 'paused') { + label += '2'; + } } return label; }; @@ -2430,7 +2449,7 @@ angular.module('syncthing.core') $scope.sharedFolders = function (deviceCfg) { var labels = []; $scope.deviceFolders(deviceCfg).forEach(function (folderID) { - labels.push($scope.folderLabelMarkUnaccepted(folderID, deviceCfg.deviceID)); + labels.push($scope.folderLabelMarkRemoteState(folderID, deviceCfg.deviceID)); }); return labels.join(', '); }; @@ -2448,6 +2467,19 @@ angular.module('syncthing.core') return false; }; + $scope.deviceHasPausedFolders = function (deviceCfg) { + if (!(deviceCfg.deviceID in $scope.completion)) { + return false; + } + for (var folderID in $scope.completion[deviceCfg.deviceID]) { + if (folderID in $scope.folders + && $scope.completion[deviceCfg.deviceID][folderID].remoteState == 'paused') { + return true; + } + } + return false; + }; + $scope.deleteFolder = function (id) { hideFolderModal(); if ($scope.currentFolder._editing != "existing") { diff --git a/gui/default/syncthing/device/editDeviceModalView.html b/gui/default/syncthing/device/editDeviceModalView.html index ad7653dc9..6cef431ca 100644 --- a/gui/default/syncthing/device/editDeviceModalView.html +++ b/gui/default/syncthing/device/editDeviceModalView.html @@ -88,6 +88,9 @@

1 The remote device has not accepted sharing this folder.

+

+ 2 The remote device has paused this folder. +

diff --git a/gui/default/syncthing/folder/editFolderModalView.html b/gui/default/syncthing/folder/editFolderModalView.html index 183bd8b86..7e28c3471 100644 --- a/gui/default/syncthing/folder/editFolderModalView.html +++ b/gui/default/syncthing/folder/editFolderModalView.html @@ -61,6 +61,9 @@

1 The remote device has not accepted sharing this folder.

+

+ 2 The remote device has paused this folder. +