From cbdb036b695a52467a6392279b400c9a98d6265e Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Thu, 30 Mar 2017 14:32:58 +0000 Subject: [PATCH] gui: Handle slices in advanced config, show devices in advanced config (fixes #2267) The ng-list directive makes angular handle lists by doing comma separation in the roundtrip. We could simplify our normal config dialog this way as well... Also adds devices that were inexplicably not available in the advanced config. This reveals some other uglyness, as the "devices" config of a folder now shows as "[object Object], [object Object]" - previously it was invisible. I think that's fine for now. GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4071 --- .../syncthing/core/syncthingController.js | 3 ++ .../settings/advancedSettingsModalView.html | 32 ++++++++++++++++--- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js index 4c28599c5..8bb387214 100755 --- a/gui/default/syncthing/core/syncthingController.js +++ b/gui/default/syncthing/core/syncthingController.js @@ -1743,6 +1743,9 @@ angular.module('syncthing.core') if (typeof value === 'boolean') { return 'checkbox'; } + if (value instanceof Array) { + return 'list'; + } if (typeof value === 'object') { return 'skip'; } diff --git a/gui/default/syncthing/settings/advancedSettingsModalView.html b/gui/default/syncthing/settings/advancedSettingsModalView.html index b003f6f92..58f689173 100644 --- a/gui/default/syncthing/settings/advancedSettingsModalView.html +++ b/gui/default/syncthing/settings/advancedSettingsModalView.html @@ -18,7 +18,8 @@
- + +
@@ -36,7 +37,8 @@
- + +
@@ -59,7 +61,29 @@
- + + +
+
+ + + + + +
+ +
+
+
+
+ +
+ +
@@ -76,7 +100,7 @@  Close
- +