-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
make it possible to share the current folder #1618
Conversation
@ChristophWurst, thanks for your PR! By analyzing the history of the files in this pull request, we identified @PVince81, @butonic and @icewind1991 to be potential reviewers. |
cc @jancborchardt for the UI part. Do you have an idea how it should look like? |
Yeah, the UI part is described in #1072 :) Anything else you need? |
ab69753
to
d4c34a9
Compare
Alright, opening the share tab was easier than I thought. However, the passed |
@ChristophWurst yes that property is only set if the folder was shared. I'm not sure if it is recursive at the moment. but that is a different issue. |
d4c34a9
to
6a790f4
Compare
Current coverage is 57.80% (diff: 0.00%)@@ master #1618 diff @@
==========================================
Files 1094 1095 +1
Lines 62798 62849 +51
Methods 6996 7006 +10
Messages 0 0
Branches 0 0
==========================================
+ Hits 36301 36328 +27
- Misses 26497 26521 +24
Partials 0 0
|
3310da4
to
3f1e935
Compare
@@ -68,6 +76,9 @@ | |||
dirInfo: self._dirInfo | |||
}); | |||
}); | |||
this._shareTab.on('sharesChanged', function(shareModel) { | |||
alert('aaoobb'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is triggered correctly. However, the shareTypes
property of the FileInfoModel is not upated, therefore the view does not reflect the current sharing status
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah mmm joy. I'll look into that.
Otherwise fuck yeah, awesome work so we can finally easily share photo folders! :) |
I just tried it but I couldn't find the option to share the current folder. But maybe it is to early to try it out. Just one remark, because @ChristophWurst asked for sharing stuff. Instead of having a different code path to create shares, how about just opening the sidebar for the selected folder if you click on the bread-crumb and then use the existing share dialog? The only thing we would need to implement here is the click on the bread-crumb to open the sidebar for the folder? Maybe the same could/should happen if you click on a empty space in the file listing? |
That was my impression of what @ChristophWurst does here. :) |
@schiessle @jancborchardt that's exactly what this PR does :-) |
9af4af6
to
e2d16db
Compare
var shareTypes = []; | ||
var shares = shareModel.getSharesWithCurrentItem(); | ||
|
||
for(i = 0; i < shares.length; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- TODO:
i
is undefined
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
…hare tab Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
…y info model changes Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
9bd181b
to
07d027f
Compare
Ok this should(tm) work now. |
b4e8204
to
0c1fd16
Compare
Confirmed, it works. 👍 for @rullzer's changes :-) |
Almost goes without saying but 👍 for the intial stuff |
I'm on it - I will fix the styling |
* properly center share icon * also apply styles for public share icon Signed-off-by: Morris Jobke <hey@morrisjobke.de>
@@ -901,7 +901,7 @@ div.crumb > span { | |||
color: #555; | |||
} | |||
div.crumb.last a { | |||
padding-right: 14px; | |||
padding-right: 0px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
div.crumb.last a + span {
margin-left: -24px;
}
Will do the trick, can you test @MorrisJobke ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't work here - then the icon is overlapped in subfolders.
@skjnldsv Could you open an issue for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I can :)
With this PR I want to add a little share icon to the file list breadcrumb view to reflect whether the current folder is shared or not. On top of this enhancement, I'll add a click handler for opening the share tab view, to finally be able share the current folder without having to navigate up one level.
@rullzer @schiessle I'm totally new to the sharing code. What's the best way to determine whether the current folder has been shared or not? From inspecting responses on my test env I've observed that the
share-types
property of the directory's PROPFIND request is only set if the folder was shared. Is that correct? Can I rely on that property or should I use something different?TODO:
Shared
+ icon when the folder is shared, similar to the file list rowschange
events on the directory's file info model and update the UI accordinglyFix #1072