mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-23 03:18:59 +00:00
gui: Fix editing devices (fixes #3236)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3237
This commit is contained in:
parent
01ae866d58
commit
8c4723ff43
@ -539,7 +539,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr ng-if="deviceFolders(deviceCfg).length > 0">
|
<tr ng-if="deviceFolders(deviceCfg).length > 0">
|
||||||
<th><span class="fa fa-fw fa-folder"></span> <span translate>Folders</span></th>
|
<th><span class="fa fa-fw fa-folder"></span> <span translate>Folders</span></th>
|
||||||
<td class="text-right">{{deviceFolders(deviceCfg).join(", ")}}</td>
|
<td class="text-right">{{deviceFolders(deviceCfg).map(folderLabel).join(", ")}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -1406,8 +1406,7 @@ angular.module('syncthing.core')
|
|||||||
var devices = $scope.folders[folderID].devices;
|
var devices = $scope.folders[folderID].devices;
|
||||||
for (var i = 0; i < devices.length; i++) {
|
for (var i = 0; i < devices.length; i++) {
|
||||||
if (devices[i].deviceID === deviceCfg.deviceID) {
|
if (devices[i].deviceID === deviceCfg.deviceID) {
|
||||||
var label = $scope.folders[folderID].label;
|
folders.push(folderID);
|
||||||
folders.push(label.length > 0 ? label : folderID);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1417,6 +1416,11 @@ angular.module('syncthing.core')
|
|||||||
return folders;
|
return folders;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.folderLabel = function (folderID) {
|
||||||
|
var label = $scope.folders[folderID].label;
|
||||||
|
return label.length > 0 ? label : folderID;
|
||||||
|
}
|
||||||
|
|
||||||
$scope.deleteFolder = function (id) {
|
$scope.deleteFolder = function (id) {
|
||||||
$('#editFolder').modal('hide');
|
$('#editFolder').modal('hide');
|
||||||
if (!$scope.editingExisting) {
|
if (!$scope.editingExisting) {
|
||||||
|
Loading…
Reference in New Issue
Block a user