mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-08 17:24:08 +00:00
parent
77cc87dfca
commit
1475c0344a
@ -1279,6 +1279,13 @@ angular.module('syncthing.core')
|
|||||||
$scope.protocolChanged = true;
|
$scope.protocolChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Parse strings to arrays before copying over
|
||||||
|
['listenAddresses', 'globalAnnounceServers'].forEach(function (key) {
|
||||||
|
$scope.tmpOptions[key] = $scope.tmpOptions["_" + key + "Str"].split(/[ ,]+/).map(function (x) {
|
||||||
|
return x.trim();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// Apply new settings locally
|
// Apply new settings locally
|
||||||
$scope.thisDeviceIn($scope.tmpDevices).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);
|
||||||
@ -1292,12 +1299,6 @@ angular.module('syncthing.core')
|
|||||||
// here as well...
|
// here as well...
|
||||||
$scope.devices = $scope.config.devices;
|
$scope.devices = $scope.config.devices;
|
||||||
|
|
||||||
['listenAddresses', 'globalAnnounceServers'].forEach(function (key) {
|
|
||||||
$scope.config.options[key] = $scope.config.options["_" + key + "Str"].split(/[ ,]+/).map(function (x) {
|
|
||||||
return x.trim();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.saveConfig(function () {
|
$scope.saveConfig(function () {
|
||||||
if (themeChanged) {
|
if (themeChanged) {
|
||||||
document.location.reload(true);
|
document.location.reload(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user