Skip to content

Commit

Permalink
Merge pull request #1785 from nextcloud/artonge/fix/progress_bar
Browse files Browse the repository at this point in the history
Prevent progress bar overflow when uploading in Folders
  • Loading branch information
artonge authored May 16, 2023
2 parents 2224a8d + 6bb7169 commit af70a0a
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 13 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_Folders_vue.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

30 changes: 29 additions & 1 deletion src/views/Folders.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<!-- Folder content -->
<div v-else-if="!initializing">
<HeaderNavigation key="navigation"
:class="{'photos-navigation--uploading': uploader.queue?.length > 0}"
:loading="loading"
:path="path"
:title="folder.basename.toString()"
Expand Down Expand Up @@ -64,7 +65,7 @@
<script>
import { mapGetters } from 'vuex'
import { UploadPicker } from '@nextcloud/upload'
import { UploadPicker, getUploader } from '@nextcloud/upload'
import { NcEmptyContent } from '@nextcloud/vue'
import VirtualGrid from 'vue-virtual-grid'
Expand Down Expand Up @@ -116,6 +117,8 @@ export default {
loading: false,
appContent: document.getElementById('app-content-vue'),
uploader: getUploader(),
}
},
Expand Down Expand Up @@ -289,4 +292,29 @@ export default {
padding: 0px #{$marginW}px 256px #{$marginW}px;
}
}
.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 af70a0a

Please sign in to comment.