Repository: syncthing/syncthing (language: go)

Issue:
Open share settings when clicking 'shared with'
Each shared folder shows an 'Shared With' item, containing all the devices that the folder is shared with. I propose to open the dialog for changing the shared with setting, when clicking on any of those devices.

And maybe do something similar with the 'Folders' item for each device in the remote device list.



Discussion / hints:
Hello! Is the issue still present? I couldn't see any discussion or approval for changes to be made. If it is present and approved, I could try to fix it.
Yes, still present (the issue would be closed otherwise).  It's waiting for someone to step up and contribute the implementation.  I have it on my radar and might start on it when I have time someday, but don't hold your breath.

You're very welcome to give it a go and make a Pull Request :-)
This is supposedly a front-end issue, so I started diving in the controller, the index template and AngularJS. I tried some code and got errors. I guess the reason I can't just copy the code from 'Remote Device' block and paste to 'Folders' block is that they are in different scopes. Do I get it right and are there any hints for a newcomer on how to solve the issue easily (as it doesn't seem huge)?
I think you're on the right track, thanks for trying to contribute.  I've looked at your branch and I don't understand why you're wrapping a new function around `editDeviceExisting()`?  The intention is just to open that dialog, ideally with the "Sharing" tab pre-selected.  The former should work with the existing function.  For the latter, look at how the "Reduced by ignore patterns" link does it, should be portable to devices as well.
The reason I'm not trying to use `editDeviceExisting()` directly is that it gives back an error:
```
Error: $scope.currentDevice.addresses is undefined
```
I couldn't quite catch why it occurs here and why it doesn't in the 'Remote Devices' context. Maybe I should somehow use `discoveryCache[device.deviceID].addresses` but I am not sure where and how exactly.
I'd guess that the argument you're passing to the function is different. If you look at the config.xml, there are two different `<device>` elements. One which holds all the device configurations and it gets used (through JSON) in the device editing modal case. The other one is just a reference below a `<folder>` element, where details such as the addresses are not repeated. That is what you're iterating through in the "shared with" case. So when clicking the link, you need to get the real device config to pass to the function. Like it is done with deviceName as well.

Just add some logging to that function to see the difference in objects being passed as argument. You definitely don't need to fill in the details yourself. 
@Paul-Stern are you still planning to work on this?

Fix patch:
diff --git a/gui/default/index.html b/gui/default/index.html
index 5a825a7e6a4..24e9aca36fa 100644
--- a/gui/default/index.html
+++ b/gui/default/index.html
@@ -593,7 +593,7 @@ <h4 class="panel-title">
                          --><span ng-switch="completion[device.deviceID][folder.id].remoteState"><!-- Avoid stray space...
                            --><span ng-switch-when="notSharing" data-original-title="{{'The remote device has not accepted sharing this folder.' | translate}}" tooltip>{{deviceName(devices[device.deviceID])}}<sup>1</sup></span><!-- Avoid stray space...
                            --><span ng-switch-when="paused" data-original-title="{{'The remote device has paused this folder.' | translate}}" tooltip>{{deviceName(devices[device.deviceID])}}<sup>2</sup></span><!-- Avoid stray space...
-                           --><span ng-switch-default>{{deviceName(devices[device.deviceID])}}</span><!-- Avoid stray space...
+                           --><span ng-switch-default><a href="" ng-click="editDeviceExisting(devices[device.deviceID])">{{deviceName(devices[device.deviceID])}}</a></span><!-- Avoid stray space...
                            --><span ng-if="!$last">,</span>
                             </span>
                           </span>


Test patch: