This commit is contained in:
@@ -378,6 +378,7 @@
|
||||
"The number of versions must be a number and cannot be blank.": "The number of versions must be a number and cannot be blank.",
|
||||
"The path cannot be blank.": "The path cannot be blank.",
|
||||
"The rate limit must be a non-negative number (0: no limit)": "The rate limit must be a non-negative number (0: no limit)",
|
||||
"The remote device has not accepted sharing this folder.": "The remote device has not accepted sharing this folder.",
|
||||
"The rescan interval must be a non-negative number of seconds.": "The rescan interval must be a non-negative number of seconds.",
|
||||
"There are no devices to share this folder with.": "There are no devices to share this folder with.",
|
||||
"There are no file versions to restore.": "There are no file versions to restore.",
|
||||
|
||||
+10
-6
@@ -532,7 +532,9 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><span class="fas fa-fw fa-share-alt"></span> <span translate>Shared With</span></th>
|
||||
<td class="text-right" ng-attr-title="{{sharesFolder(folder)}}">{{sharesFolder(folder)}}</td>
|
||||
<td class="text-right">
|
||||
<span tooltip data-original-title="{{sharesFolder(folder)}} {{folderHasUnacceptedDevices(folder) ? '<br/>(<sup>1</sup>' + ('The remote device has not accepted sharing this folder.' | translate) + ')' : ''}}" ng-bind-html="sharesFolder(folder)"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr ng-if="folderStats[folder.id].lastScan">
|
||||
<th><span class="far fa-fw fa-clock"></span> <span translate>Last Scan</span></th>
|
||||
@@ -668,8 +670,8 @@
|
||||
<td class="text-right">
|
||||
<span class="data" tooltip data-original-title="{{'Show detailed listener status' | translate}}.">
|
||||
<a href="" ng-class="{'text-success': listenersFailed.length == 0, 'text-danger': listenersFailed.length == listenersTotal}" ng-click="showListenerStatus()">
|
||||
{{listenersTotal-listenersFailed.length}}/{{listenersTotal}}
|
||||
</a>
|
||||
{{listenersTotal-listenersFailed.length}}/{{listenersTotal}}
|
||||
</a>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -678,8 +680,8 @@
|
||||
<td class="text-right">
|
||||
<span class="data" tooltip data-original-title="{{'Show detailed discovery status' | translate}}.">
|
||||
<a href="" ng-class="{'text-success': discoveryFailed.length == 0, 'text-danger': discoveryFailed.length == discoveryTotal}" ng-click="showDiscoveryStatus()">
|
||||
{{discoveryTotal-discoveryFailed.length}}/{{discoveryTotal}}
|
||||
</a>
|
||||
{{discoveryTotal-discoveryFailed.length}}/{{discoveryTotal}}
|
||||
</a>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -833,7 +835,9 @@
|
||||
</tr>
|
||||
<tr ng-if="deviceFolders(deviceCfg).length > 0">
|
||||
<th><span class="fas fa-fw fa-folder"></span> <span translate>Folders</span></th>
|
||||
<td class="text-right" ng-attr-title="{{deviceFolders(deviceCfg).map(folderLabel).join(', ')}}">{{deviceFolders(deviceCfg).map(folderLabel).join(", ")}}</td>
|
||||
<td class="text-right">
|
||||
<span tooltip data-original-title="{{sharedFolders(deviceCfg)}} {{deviceHasUnacceptedFolders(deviceCfg) ? '<br/>(<sup>1</sup>' + ('The remote device has not accepted sharing this folder.' | translate) + ')' : '' }}" ng-bind-html="sharedFolders(deviceCfg)"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr ng-if="deviceCfg.remoteGUIPort > 0">
|
||||
<th><span class="fas fa-fw fa-desktop"></span> <span translate>Remote GUI</span></th>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<div class="col-md-6 checkbox">
|
||||
<label for="sharedwith-{{id}}">
|
||||
<input id="sharedwith-{{id}}" ng-model="selected[id]" type="checkbox" />
|
||||
<span tooltip data-original-title="{{id}}">{{label}}</span>
|
||||
<span tooltip data-original-title="{{id}}" ng-bind-html="label"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" ng-switch="folderType !== 'receiveencrypted' && !encryptionPasswords[id]">
|
||||
<span ng-switch-when='true' class="fas fa-fw fa-unlock" />
|
||||
<span ng-switch-default class="fas fa-fw fa-lock" />
|
||||
<span ng-switch-when='true' class="fas fa-fw fa-unlock"></span>
|
||||
<span ng-switch-default class="fas fa-fw fa-lock"></span>
|
||||
</span>
|
||||
<span ng-switch="folderType === 'receiveencrypted'">
|
||||
<span ng-switch-when='true'>
|
||||
@@ -30,10 +30,10 @@
|
||||
</span>
|
||||
<span ng-switch="selected[id] && folderType !== 'receiveencrypted'" class="input-group-addon">
|
||||
<span ng-switch-when='true'>
|
||||
<span class="button fas fa-fw fa-eye" ng-click="togglePasswordVisibility()" />
|
||||
<span class="button fas fa-fw fa-eye" ng-click="togglePasswordVisibility()"></span>
|
||||
</span>
|
||||
<span ng-switch-default>
|
||||
<span class="button fas fa-fw fa-eye" disabled />
|
||||
<span class="button fas fa-fw fa-eye" disabled></span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -2365,17 +2365,37 @@ angular.module('syncthing.core')
|
||||
+ '&device=' + encodeURIComponent(deviceID));
|
||||
};
|
||||
|
||||
$scope.deviceNameMarkUnaccepted = 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].accepted) {
|
||||
name += '<sup>1</sup>';
|
||||
}
|
||||
return name;
|
||||
};
|
||||
|
||||
$scope.sharesFolder = function (folderCfg) {
|
||||
var names = [];
|
||||
folderCfg.devices.forEach(function (device) {
|
||||
if (device.deviceID !== $scope.myID) {
|
||||
names.push($scope.deviceName($scope.devices[device.deviceID]));
|
||||
names.push($scope.deviceNameMarkUnaccepted(device.deviceID, folderCfg.id));
|
||||
}
|
||||
});
|
||||
names.sort();
|
||||
return names.join(", ");
|
||||
};
|
||||
|
||||
$scope.folderHasUnacceptedDevices = function (folderCfg) {
|
||||
for (var deviceID in $scope.completion) {
|
||||
if (deviceID in $scope.devices
|
||||
&& folderCfg.id in $scope.completion[deviceID]
|
||||
&& !$scope.completion[deviceID][folderCfg.id].accepted) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
$scope.deviceFolders = function (deviceCfg) {
|
||||
var folders = [];
|
||||
$scope.folderList().forEach(function (folder) {
|
||||
@@ -2397,6 +2417,36 @@ angular.module('syncthing.core')
|
||||
return label && label.length > 0 ? label : folderID;
|
||||
};
|
||||
|
||||
$scope.folderLabelMarkUnaccepted = 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].accepted) {
|
||||
label += '<sup>1</sup>';
|
||||
}
|
||||
return label;
|
||||
};
|
||||
|
||||
$scope.sharedFolders = function (deviceCfg) {
|
||||
var labels = [];
|
||||
$scope.deviceFolders(deviceCfg).forEach(function (folderID) {
|
||||
labels.push($scope.folderLabelMarkUnaccepted(folderID, deviceCfg.deviceID));
|
||||
});
|
||||
return labels.join(', ');
|
||||
};
|
||||
|
||||
$scope.deviceHasUnacceptedFolders = 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].accepted) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
$scope.deleteFolder = function (id) {
|
||||
hideFolderModal();
|
||||
if ($scope.currentFolder._editing != "existing") {
|
||||
|
||||
@@ -83,8 +83,11 @@
|
||||
<a href="#" ng-click="selectAllSharedFolders(false)" translate>Deselect All</a></small>
|
||||
</p>
|
||||
<div class="form-group" ng-repeat="folder in currentSharing.shared">
|
||||
<share-template selected="currentSharing.selected" encryption-passwords="currentSharing.encryptionPasswords" id="{{folder.id}}" label="{{folderLabel(folder.id)}}" folder-type="{{folder.type}}" untrusted="currentDevice.untrusted" />
|
||||
<share-template selected="currentSharing.selected" encryption-passwords="currentSharing.encryptionPasswords" id="{{folder.id}}" label="{{folderLabelMarkUnaccepted(folder.id, currentDevice.deviceID)}}" folder-type="{{folder.type}}" untrusted="currentDevice.untrusted" />
|
||||
</div>
|
||||
<p class="help-block" ng-if="deviceHasUnacceptedFolders(currentDevice)">
|
||||
<sup>1</sup> <span translate>The remote device has not accepted sharing this folder.</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="form-horizontal" ng-if="currentSharing.unrelated.length">
|
||||
<label translate for="folders">Unshared Folders</label>
|
||||
|
||||
@@ -56,8 +56,11 @@
|
||||
<a href="#" ng-click="selectAllSharedDevices(false)" translate>Deselect All</a></small>
|
||||
</p>
|
||||
<div class="form-group" ng-repeat="device in currentSharing.shared">
|
||||
<share-template selected="currentSharing.selected" encryption-passwords="currentSharing.encryptionPasswords" id="{{device.deviceID}}" label="{{deviceName(device)}}" folder-type="{{currentFolder.type}}" untrusted="device.untrusted || pendingIsRemoteEncrypted(currentFolder.id, device.deviceID)" />
|
||||
<share-template selected="currentSharing.selected" encryption-passwords="currentSharing.encryptionPasswords" id="{{device.deviceID}}" label="{{deviceNameMarkUnaccepted(device.deviceID, currentFolder.id)}}" folder-type="{{currentFolder.type}}" untrusted="device.untrusted || pendingIsRemoteEncrypted(currentFolder.id, device.deviceID)" />
|
||||
</div>
|
||||
<p class="help-block" ng-if="folderHasUnacceptedDevices(currentFolder)">
|
||||
<sup>1</sup> <span translate>The remote device has not accepted sharing this folder.</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="form-horizontal" ng-if="currentSharing.unrelated.length || otherDevices().length <= 0">
|
||||
<label translate>Unshared Devices</label>
|
||||
|
||||
Reference in New Issue
Block a user