gui: Show ID under each device section (local / remote), clickable for QR code (#7728)
This commit is contained in:
@@ -1202,13 +1202,20 @@ angular.module('syncthing.core')
|
||||
};
|
||||
|
||||
$scope.deviceName = function (deviceCfg) {
|
||||
if (typeof deviceCfg === 'undefined' || typeof deviceCfg.deviceID === 'undefined') {
|
||||
if (typeof deviceCfg === 'undefined') {
|
||||
return "";
|
||||
}
|
||||
if (deviceCfg.name) {
|
||||
return deviceCfg.name;
|
||||
}
|
||||
return deviceCfg.deviceID.substr(0, 6);
|
||||
return $scope.deviceShortID(deviceCfg.deviceID);
|
||||
};
|
||||
|
||||
$scope.deviceShortID = function (deviceID) {
|
||||
if (typeof deviceID === 'undefined') {
|
||||
return "";
|
||||
}
|
||||
return deviceID.substr(0, 6);
|
||||
};
|
||||
|
||||
$scope.thisDeviceName = function () {
|
||||
@@ -1222,6 +1229,11 @@ angular.module('syncthing.core')
|
||||
return device.deviceID.substr(0, 6);
|
||||
};
|
||||
|
||||
$scope.showDeviceIdentification = function (deviceCfg) {
|
||||
$scope.currentDevice = deviceCfg;
|
||||
$('#idqr').modal();
|
||||
};
|
||||
|
||||
$scope.setDevicePause = function (device, pause) {
|
||||
$scope.devices[device].paused = pause;
|
||||
$scope.config.devices = $scope.deviceList();
|
||||
|
||||
Reference in New Issue
Block a user