-
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
Changes from 1 commit
dddf854
338c546
72ca1f4
4eceee4
7c56617
e700f6e
158c7b8
a8d3328
55c19c2
621093e
ed8aded
341a465
e669f3b
c36860c
57e11a5
5087c6c
b483e8d
5eeb74a
5e1e2e4
0c50a39
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ | |
</div> | ||
|
||
<!-- This buttons are shown on a dropdown on mobile phones --> | ||
<div id="dropdown" :class="{ active: showMore }"> | ||
<div class="dropdown" :class="{ active: showMore }"> | ||
<div v-if="!isListing || !isMobile"> | ||
<share-button v-show="showShareButton"></share-button> | ||
<rename-button v-show="showRenameButton"></rename-button> | ||
|
@@ -49,6 +49,17 @@ | |
</button> | ||
</div> | ||
</template> | ||
<template v-if="isSharing"> | ||
<!-- This buttons are shown on a dropdown on mobile phones --> | ||
<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 commentThe reason will be displayed to describe this comment to others. Learn more. Can we reuse the existing selection toggle and download buttons? |
||
<i class="material-icons">check_circle</i> | ||
<span>{{ $t('buttons.select') }}</span> | ||
</button> | ||
</div> | ||
</template> | ||
|
||
<div v-show="showOverlay" @click="resetPrompts" class="overlay"></div> | ||
</div> | ||
|
@@ -110,14 +121,17 @@ export default { | |
'isEditor', | ||
'isPreview', | ||
'isListing', | ||
'isLogged' | ||
'isLogged', | ||
'isSharing', | ||
'sharedSelectedCount' | ||
]), | ||
...mapState([ | ||
'req', | ||
'user', | ||
'loading', | ||
'reload', | ||
'multiple' | ||
'multiple', | ||
'shared' | ||
]), | ||
logoURL: () => logoURL, | ||
isExecEnabled: () => enableExec, | ||
|
@@ -156,7 +170,7 @@ export default { | |
: this.user.perm.create) | ||
}, | ||
showMore () { | ||
return this.isFiles && this.$store.state.show === 'more' | ||
return (this.isFiles || this.isSharing) && this.$store.state.show === 'more' | ||
}, | ||
showOverlay () { | ||
return this.showMore | ||
|
@@ -176,6 +190,10 @@ export default { | |
this.$store.commit('multiple', !this.multiple) | ||
this.resetPrompts() | ||
}, | ||
toggleSharedMultipleSelection () { | ||
this.$store.commit('sharedMultiple', !this.shared.multiple) | ||
this.resetPrompts() | ||
}, | ||
resetPrompts () { | ||
this.$store.commit('closeHovers') | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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. |
||
hash: '', | ||
loaded: false, | ||
selected: [], | ||
multiple: false | ||
} | ||
|
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.