Skip to content

Commit

Permalink
Merge pull request #47493 from nextcloud/backport/47467/stable29
Browse files Browse the repository at this point in the history
[stable29] fix(files): Adjust margin at the file list bottom
  • Loading branch information
susnux authored Aug 27, 2024
2 parents 7153c36 + cb762b4 commit c9f82ff
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 16 deletions.
15 changes: 7 additions & 8 deletions apps/files/src/components/FilesListTableFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import Vue from 'vue'

import { useFilesStore } from '../store/files.ts'
import { usePathsStore } from '../store/paths.ts'
import { useRouteParameters } from '../composables/useRouteParameters.ts'

export default Vue.extend({
name: 'FilesListTableFooter',
Expand Down Expand Up @@ -97,9 +98,12 @@ export default Vue.extend({
setup() {
const pathsStore = usePathsStore()
const filesStore = useFilesStore()
const { directory } = useRouteParameters()

return {
filesStore,
pathsStore,
directory,
}
},

Expand All @@ -108,20 +112,15 @@ export default Vue.extend({
return this.$navigation.active
},

dir() {
// Remove any trailing slash but leave root slash
return (this.$route?.query?.dir || '/').replace(/^(.+)\/$/, '$1')
},

currentFolder() {
if (!this.currentView?.id) {
return
}

if (this.dir === '/') {
if (this.directory === '/') {
return this.filesStore.getRoot(this.currentView.id)
}
const fileId = this.pathsStore.getPath(this.currentView.id, this.dir)
const fileId = this.pathsStore.getPath(this.currentView.id, this.directory)
return this.filesStore.getNode(fileId)
},

Expand Down Expand Up @@ -160,7 +159,7 @@ export default Vue.extend({
<style scoped lang="scss">
// Scoped row
tr {
margin-bottom: 300px;
margin-bottom: max(25vh, var(--body-container-margin));
border-top: 1px solid var(--color-border);
// Prevent hover effect on the whole row
background-color: transparent !important;
Expand Down
5 changes: 0 additions & 5 deletions apps/files/src/components/FilesListVirtual.vue
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,6 @@ export default defineComponent({
top: 0;
}
// Table footer
.files-list__tfoot {
min-height: 300px;
}
tr {
position: relative;
display: flex;
Expand Down
4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.

0 comments on commit c9f82ff

Please sign in to comment.