-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
download shared subdirectory #1184
Conversation
added esc clear
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.
I found a bug that when you double click on a file which has #
in its name the blank page is displayed.
|
Which parts should be updated?
I plan to make it more like the multiple style in the file listing page when I have time
Abitratry path can be detected in the backend, I don't think that's an issue, normal user won't bother changing url by hand. The root directory potion is automatically filled. It's actually essential. According to this comment. Say we share a directory a, there are dir a, b, c below it. When a request for /api/public/dl/hash/a came, which a is it, the root a or a below it, removing the trailing filename would fix it, but that leads to ugly download url a/a, 1.mp4/mp4. I did it in the previous commit. Also this means err check can't distinguish between two file with same name. If root directory is only not shown in the address bar, there is quite a lot to do when someone use the subdirectory url to access the subdirectory, thanks to this comment. Not appending filename when downloading can fix them pretty easily. I think if root directory name is a thing, it can be checked. And normally user won't bother tickering with urls. |
I see 2 ways to resolve the info panel issue:
|
frontend/src/components/Header.vue
Outdated
@@ -49,6 +49,17 @@ | |||
</button> | |||
</div> | |||
</template> | |||
<template v-if="isSharing"> |
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.
Instead of creating a whole new dropdown, lets use the v-show
directive on the wanted elements.
frontend/src/components/Header.vue
Outdated
<div class="dropdown" :class="{ active: showMore }"> | ||
<download-button v-if="sharedSelectedCount > 0"></download-button> | ||
|
||
<button @click="toggleSharedMultipleSelection" :aria-label="$t('buttons.selectMultiple')" :title="$t('buttons.selectMultiple')" class="action" > |
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.
Can we reuse the existing selection toggle and download buttons?
frontend/src/store/index.js
Outdated
@@ -26,6 +26,9 @@ const state = { | |||
showConfirm: null, | |||
previewMode: false, | |||
shared: { | |||
req: {}, |
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.
I think we can reuse the current existing state properties. Also you can make the hash work as a getter using only the req state.
Description
Currently shared folder can't be navigated like a real folder, only direct subdirectory and files can be viewed, but not downloadable separately.
This pr fixes issue. Folders can be navigated and select files can be downloaded.
馃毃 Before submitting your PR, please read community, and indicate which issues (in any of the repos) are either fixed or closed by this PR. See GitHub Help: Closing issues using keywords.
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did, what alternatives you considered, etc.
鉂わ笍 Thank you!