Repository navigation
Conversation
|
Should work on All platform except OSX. (because of #6328 ) |
| QString relativePath = systemPath.mid(syncFolder->cleanPath().length() + 1); | ||
| bool isOnTheServer = syncFolder->journalDb()->getFileRecord(relativePath, &rec) && rec.isValid(); | ||
|
|
||
| listener->sendMessage(QLatin1String("MENU_ITEM:OPEN_PRIVATE_LINK") + flagString(isOnTheServer) + tr("Open in browser")); |
There was a problem hiding this comment.
Minor: I think it would look nicer if this was the last option in the menu, because it belongs with the other "private link" actions.
There was a problem hiding this comment.
I put it first because I thought it would be the most commonly used action. But I can put it last.
|
@SamuAlfageme This is what was requested in the ticket but I still think disabling sharing options for files that can't be reshared is confusing. The user doesn't know why the options are suddenly disabled! How about we put a single disabled "This item cannot be reshared" action in the menu instead? |
I like that idea. So if the file is not on the server, it can be the normal menu, disabled (then normally the overlay icon should show it is syncing) |
|
@ogoffart I'm not certain about email/copy private link. Why would you want to do that if you can't share it with anyone. That's why I thought disabling them when resharing is disabled is fine. But maybe your private link works with the person who originally shared the item with you? Then the actions could be useful. I'll test that now. EDIT: Yes. So if A shares an item with a user B, B still might want to copy/email the private link for that item or its contents. Either to A or to other people who have access. |
|
I updated the request. The "open in browser" is now the last item. If sharing is not allowed, there is a new disabled entry that says it is not allowed. |
| // If sharing is globally disabled, do not show any sharing entries. | ||
| // If there is no permission to share for this file, add a disabled entry saying so | ||
| if (isOnTheServer && !rec._remotePerm.isNull() && !rec._remotePerm.hasPermission(RemotePermissions::CanReshare)) { | ||
| listener->sendMessage(QLatin1String("MENU_ITEM:DISABLED:d:") + tr("Re-sharing this file is not allowed")); |
There was a problem hiding this comment.
Very minor: it's called "resharing" without dash on the server
…s disabled. This adds "Open in browser" entry in the menu (Issue #5903) Also mark the entries as disabled when the file is not yet on the server. If re-sharing is not allowed for that file, a disabled explaination entry is added to the menu. If sharing is disabled globaly in the branding or in the server, the share entry will not be present. (Issues #4205 and #4608) Meta issue #6292
That's working like a clock when sharing is disabled for a file ("reshare"): But when sharing is disabled in capabilities we are not displaying the "private link entries": (The icon overlay also stays in "shared" but this happens in the webUI as well - IIRC there was no "remove sharing from all |
|
@SamuAlfageme You're saying: Please show the private link options when sharing capabilities are disabled? Does that make sense? I thought the primary usecase for private links was for pointing to files inside a directory you had shared with someone - why would one care about private links when sharing is impossible globally? (I understand it makes sense when resharing is forbidden - file could already be shared) |
|
@ckamm you're absolutely right on your explanation - I got myself influenced by what it happens on the webUI: (I'll poke PMs to see if they should disable that switch in there as well) |
|
@pmaier1 FYI ^ Thought about it. Private links maybe could stay, even when sharing is disabled. They are useful for the user itself. With "open in browser" feature in client, demand is probably smaller. |



This adds "Open in browser" entry in the menu (Issue #5903)
Also mark the share entries as disabled when sharing is not allowed
or not available for a given file.
If sharing is disabled globaly in the branding or in the server,
the share entry will not be present.
(Issues #4205 and #4608)
Meta issue #6292