mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-13 00:58:32 +00:00
This commit is contained in:
parent
d10773c311
commit
34fee05a1d
@ -1276,11 +1276,17 @@ angular.module('syncthing.core')
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Apply new settings locally
|
// Apply new settings locally
|
||||||
$scope.thisDevice().name = $scope.tmpOptions.deviceName;
|
$scope.thisDeviceIn($scope.tmpDevices).name = $scope.tmpOptions.deviceName;
|
||||||
$scope.config.options = angular.copy($scope.tmpOptions);
|
$scope.config.options = angular.copy($scope.tmpOptions);
|
||||||
$scope.config.gui = angular.copy($scope.tmpGUI);
|
$scope.config.gui = angular.copy($scope.tmpGUI);
|
||||||
$scope.config.remoteIgnoredDevices = angular.copy($scope.tmpRemoteIgnoredDevices);
|
$scope.config.remoteIgnoredDevices = angular.copy($scope.tmpRemoteIgnoredDevices);
|
||||||
$scope.config.devices = angular.copy($scope.tmpDevices);
|
$scope.config.devices = angular.copy($scope.tmpDevices);
|
||||||
|
// $scope.devices is updated by updateLocalConfig based on
|
||||||
|
// the config changed event, but settingsModified will look
|
||||||
|
// at it before that and conclude that the settings are
|
||||||
|
// modified (even though we just saved) unless we update
|
||||||
|
// here as well...
|
||||||
|
$scope.devices = $scope.config.devices;
|
||||||
|
|
||||||
['listenAddresses', 'globalAnnounceServers'].forEach(function (key) {
|
['listenAddresses', 'globalAnnounceServers'].forEach(function (key) {
|
||||||
$scope.config.options[key] = $scope.config.options["_" + key + "Str"].split(/[ ,]+/).map(function (x) {
|
$scope.config.options[key] = $scope.config.options["_" + key + "Str"].split(/[ ,]+/).map(function (x) {
|
||||||
@ -1509,8 +1515,12 @@ angular.module('syncthing.core')
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.thisDevice = function () {
|
$scope.thisDevice = function () {
|
||||||
for (var i = 0; i < $scope.devices.length; i++) {
|
return $scope.thisDeviceIn($scope.devices);
|
||||||
var n = $scope.devices[i];
|
}
|
||||||
|
|
||||||
|
$scope.thisDeviceIn = function (l) {
|
||||||
|
for (var i = 0; i < l.length; i++) {
|
||||||
|
var n = l[i];
|
||||||
if (n.deviceID === $scope.myID) {
|
if (n.deviceID === $scope.myID) {
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user