Skip to content

Commit 6d31abd

Browse files
authored
Merge pull request #47467 from nextcloud/fix/virtual-files-list
fix(files): Adjust margin at the file list bottom
2 parents c6ec822 + e840ec2 commit 6d31abd

File tree

4 files changed

+9
-16
lines changed

4 files changed

+9
-16
lines changed

apps/files/src/components/FilesListTableFooter.vue

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ import { defineComponent } from 'vue'
5050
5151
import { useFilesStore } from '../store/files.ts'
5252
import { usePathsStore } from '../store/paths.ts'
53+
import { useRouteParameters } from '../composables/useRouteParameters.ts'
5354
5455
export default defineComponent({
5556
name: 'FilesListTableFooter',
@@ -84,27 +85,24 @@ export default defineComponent({
8485
setup() {
8586
const pathsStore = usePathsStore()
8687
const filesStore = useFilesStore()
88+
const { directory } = useRouteParameters()
8789
return {
8890
filesStore,
8991
pathsStore,
92+
directory,
9093
}
9194
},
9295
9396
computed: {
94-
dir() {
95-
// Remove any trailing slash but leave root slash
96-
return (this.$route?.query?.dir || '/').replace(/^(.+)\/$/, '$1')
97-
},
98-
9997
currentFolder() {
10098
if (!this.currentView?.id) {
10199
return
102100
}
103101
104-
if (this.dir === '/') {
102+
if (this.directory === '/') {
105103
return this.filesStore.getRoot(this.currentView.id)
106104
}
107-
const fileId = this.pathsStore.getPath(this.currentView.id, this.dir)!
105+
const fileId = this.pathsStore.getPath(this.currentView.id, this.directory)!
108106
return this.filesStore.getNode(fileId)
109107
},
110108
@@ -143,7 +141,7 @@ export default defineComponent({
143141
<style scoped lang="scss">
144142
// Scoped row
145143
tr {
146-
margin-bottom: 300px;
144+
margin-bottom: max(25vh, var(--body-container-margin));
147145
border-top: 1px solid var(--color-border);
148146
// Prevent hover effect on the whole row
149147
background-color: transparent !important;

apps/files/src/components/FilesListVirtual.vue

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -427,11 +427,6 @@ export default defineComponent({
427427
top: var(--fixed-top-position);
428428
}
429429
430-
// Table footer
431-
.files-list__tfoot {
432-
min-height: 300px;
433-
}
434-
435430
tr {
436431
position: relative;
437432
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)