Skip to content

Commit

Permalink
Prevent progress bar overflow when uploading in album content
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <[email protected]>
  • Loading branch information
artonge committed Jun 8, 2023
1 parent 7fdb9c8 commit 9c483c7
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion src/views/AlbumContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<HeaderNavigation key="navigation"
slot="header"
slot-scope="{selectedFileIds}"
:class="{'photos-navigation--uploading': uploader.queue?.length > 0}"
:loading="loadingFiles"
:params="{ albumName }"
:path="'/' + albumName"
Expand Down Expand Up @@ -157,7 +158,7 @@ import { addNewFileMenuEntry, removeNewFileMenuEntry } from '@nextcloud/files'
import { getCurrentUser } from '@nextcloud/auth'
import { mapActions, mapGetters } from 'vuex'
import { NcActions, NcActionButton, NcButton, NcModal, NcEmptyContent, NcActionSeparator, NcLoadingIcon, isMobile } from '@nextcloud/vue'
import { UploadPicker } from '@nextcloud/upload'
import { UploadPicker, getUploader } from '@nextcloud/upload'
import debounce from 'debounce'

import Close from 'vue-material-design-icons/Close.vue'
Expand Down Expand Up @@ -243,6 +244,9 @@ export default {
showEditAlbumForm: false,

loadingAddCollaborators: false,

uploader: getUploader(),

newFileMenuEntry: {
id: 'album-add',
displayName: t('photos', 'Add photos to this album'),
Expand Down Expand Up @@ -442,4 +446,26 @@ export default {
color: var(--color-text-lighter);
}
}

.photos-navigation {
position: relative;
// Add space at the bottom for the progress bar.
&--uploading {
margin-bottom: 30px;
}
}

:deep(.upload-picker) {
.upload-picker__progress {
position: absolute;
bottom: -30px;
left: 64px;
margin: 0;
}
.upload-picker__cancel {
position: absolute;
bottom: -24px;
right: 50px;
}
}
</style>

0 comments on commit 9c483c7

Please sign in to comment.