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 8, 2023
1 parent 7fdb9c8 commit 7405dd5
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
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 7405dd5

Please sign in to comment.