You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Open share settings when clicking 'shared with' #8972
enhancementNew features or improvements of some kind, as opposed to a problem (bug)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussiongood first issueGood starting points for new contributorsuiIssues related to the graphical user interface
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.
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.
enhancementNew features or improvements of some kind, as opposed to a problem (bug)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussiongood first issueGood starting points for new contributorsuiIssues related to the graphical user interface
Activity
Paul-Stern commentedon Dec 10, 2023
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.
acolomb commentedon Dec 10, 2023
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 :-)
gui: (draft) Use share settings when clicking 'shared with'. (fixes s…
Paul-Stern commentedon Dec 14, 2023
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)?
gui: (draft) Fix name in 'Shared With' edit (fixes syncthing#8972)
acolomb commentedon Dec 15, 2023
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.Paul-Stern commentedon Dec 16, 2023
The reason I'm not trying to use
editDeviceExisting()directly is that it gives back an error: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].addressesbut I am not sure where and how exactly.gui: (draft) Make use of editDeviceExisting() in 'Shared With' block
gui: (draft) Set addressess for the device (fixes syncthing#8972)
acolomb commentedon Dec 16, 2023
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.
acolomb commentedon Mar 5, 2024
@Paul-Stern are you still planning to work on this?
passed full config to otherDevices to make device name clickable in f…
gui: Open devices on click in Shared With list in folder info (fixes s…
bugith commentedon Mar 26, 2024
The implementation is not the one @BartG95 & @Paul-Stern described in OP: https://forum.syncthing.net/t/shared-with-settings-implementation/21855
Click any link in Folders pane should direct user to Edit Folder dialog "Sharing" tab, NOT General tab in Edit Device. As it works today it only allows to unshare this folder (or any other, or any other setting) within the clicked device.
[EDIT] Okay, I did a fork and try my first contribution...
index.html: Add one-click access to #folder-sharing & #device-sharing (…
Merge branch 'main' into integrationtests
Merge branch 'main' into integrationtests