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 <louis@chmn.me>
  • Loading branch information
artonge committed Jun 14, 2023
1 parent cf390c4 commit 538ea76
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 10 deletions.
4 changes: 2 additions & 2 deletions js/photos-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-main.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-public.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-src_views_AlbumContent_vue.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-src_views_AlbumContent_vue.js.map

Large diffs are not rendered by default.

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 @@ -158,7 +159,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'
Expand Down Expand Up @@ -244,6 +245,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 @@ -443,4 +447,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 538ea76

Please sign in to comment.