Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open share settings when clicking 'shared with' #8972

Closed
BartG95 opened this issue Jul 6, 2023 · 8 comments
Closed

Open share settings when clicking 'shared with' #8972

BartG95 opened this issue Jul 6, 2023 · 8 comments
Labels
enhancement New features or improvements of some kind, as opposed to a problem (bug) good first issue Good starting points for new contributors ui Issues related to the graphical user interface
Milestone

Comments

@BartG95
Copy link

BartG95 commented Jul 6, 2023

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.

@BartG95 BartG95 added enhancement New features or improvements of some kind, as opposed to a problem (bug) needs-triage New issues needed to be validated labels Jul 6, 2023
@acolomb acolomb added ui Issues related to the graphical user interface good first issue Good starting points for new contributors and removed needs-triage New issues needed to be validated labels Sep 10, 2023
@Paul-Stern
Copy link

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
Copy link
Member

acolomb commented 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 :-)

@Paul-Stern
Copy link

Paul-Stern commented 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)?

Paul-Stern added a commit to Paul-Stern/syncthing that referenced this issue Dec 15, 2023
@acolomb
Copy link
Member

acolomb commented 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
Copy link

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.

Paul-Stern added a commit to Paul-Stern/syncthing that referenced this issue Dec 16, 2023
Paul-Stern added a commit to Paul-Stern/syncthing that referenced this issue Dec 16, 2023
@acolomb
Copy link
Member

acolomb commented 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
Copy link
Member

acolomb commented Mar 5, 2024

@Paul-Stern are you still planning to work on this?

@bugith
Copy link

bugith commented 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...

bugith added a commit to bugith/syncthing that referenced this issue Mar 27, 2024
…fixes syncthing#8972)

Add links to quick access from a Folder to its members edit screen (#folder-sharing) and from a RemoteDevice to the list of folders they are enrolled edit screen (#device-sharing).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or improvements of some kind, as opposed to a problem (bug) good first issue Good starting points for new contributors ui Issues related to the graphical user interface
Projects
None yet
Development

No branches or pull requests

5 participants