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

[stable30] fix(files): Adjust margin at the file list bottom #47492

Merged
merged 2 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions apps/files/src/components/FilesListTableFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import { defineComponent } from 'vue'

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

export default defineComponent({
name: 'FilesListTableFooter',
Expand Down Expand Up @@ -84,27 +85,24 @@ export default defineComponent({
setup() {
const pathsStore = usePathsStore()
const filesStore = useFilesStore()
const { directory } = useRouteParameters()
return {
filesStore,
pathsStore,
directory,
}
},

computed: {
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 @@ -143,7 +141,7 @@ export default defineComponent({
<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 @@ -427,11 +427,6 @@ export default defineComponent({
top: var(--fixed-top-position);
}

// Table footer
.files-list__tfoot {
min-height: 300px;
}

tr {
position: relative;
display: flex;
Expand Down
Loading