Skip to content

Commit c9f82ff

Browse files
authored
Merge pull request #47493 from nextcloud/backport/47467/stable29
[stable29] fix(files): Adjust margin at the file list bottom
2 parents 7153c36 + cb762b4 commit c9f82ff

File tree

4 files changed

+10
-16
lines changed

4 files changed

+10
-16
lines changed

apps/files/src/components/FilesListTableFooter.vue

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ import Vue from 'vue'
6464
6565
import { useFilesStore } from '../store/files.ts'
6666
import { usePathsStore } from '../store/paths.ts'
67+
import { useRouteParameters } from '../composables/useRouteParameters.ts'
6768
6869
export default Vue.extend({
6970
name: 'FilesListTableFooter',
@@ -97,9 +98,12 @@ export default Vue.extend({
9798
setup() {
9899
const pathsStore = usePathsStore()
99100
const filesStore = useFilesStore()
101+
const { directory } = useRouteParameters()
102+
100103
return {
101104
filesStore,
102105
pathsStore,
106+
directory,
103107
}
104108
},
105109
@@ -108,20 +112,15 @@ export default Vue.extend({
108112
return this.$navigation.active
109113
},
110114
111-
dir() {
112-
// Remove any trailing slash but leave root slash
113-
return (this.$route?.query?.dir || '/').replace(/^(.+)\/$/, '$1')
114-
},
115-
116115
currentFolder() {
117116
if (!this.currentView?.id) {
118117
return
119118
}
120119
121-
if (this.dir === '/') {
120+
if (this.directory === '/') {
122121
return this.filesStore.getRoot(this.currentView.id)
123122
}
124-
const fileId = this.pathsStore.getPath(this.currentView.id, this.dir)
123+
const fileId = this.pathsStore.getPath(this.currentView.id, this.directory)
125124
return this.filesStore.getNode(fileId)
126125
},
127126
@@ -160,7 +159,7 @@ export default Vue.extend({
160159
<style scoped lang="scss">
161160
// Scoped row
162161
tr {
163-
margin-bottom: 300px;
162+
margin-bottom: max(25vh, var(--body-container-margin));
164163
border-top: 1px solid var(--color-border);
165164
// Prevent hover effect on the whole row
166165
background-color: transparent !important;

apps/files/src/components/FilesListVirtual.vue

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -414,11 +414,6 @@ export default defineComponent({
414414
top: 0;
415415
}
416416
417-
// Table footer
418-
.files-list__tfoot {
419-
min-height: 300px;
420-
}
421-
422417
tr {
423418
position: relative;
424419
display: flex;

dist/files-main.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files-main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)