Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent progress bar overflow when uploading in Folders #1785

Merged
merged 1 commit into from May 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
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>