aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/src/components/FileEntry.vue
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2023-04-12 18:43:09 +0200
committernextcloud-command <nextcloud-command@users.noreply.github.com>2023-04-13 06:08:39 +0000
commit225d6e2dcf6ae330161ebd968afce48be55f5666 (patch)
tree914a4e84c651799b9e912f01cb67b743af699e3c /apps/files/src/components/FileEntry.vue
parentf37b29eb2da66c66fd3752209c9e552948e35ca1 (diff)
downloadnextcloud-server-225d6e2dcf6ae330161ebd968afce48be55f5666.tar.gz
nextcloud-server-225d6e2dcf6ae330161ebd968afce48be55f5666.zip
feat(files): better breakpoints and sidebar responsive design
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps/files/src/components/FileEntry.vue')
-rw-r--r--apps/files/src/components/FileEntry.vue19
1 files changed, 11 insertions, 8 deletions
diff --git a/apps/files/src/components/FileEntry.vue b/apps/files/src/components/FileEntry.vue
index d485d9d78df..7db22482220 100644
--- a/apps/files/src/components/FileEntry.vue
+++ b/apps/files/src/components/FileEntry.vue
@@ -104,7 +104,7 @@
<script lang='ts'>
import { debounce } from 'debounce'
import { formatFileSize } from '@nextcloud/files'
-import { Fragment } from 'vue-fragment'
+import { Fragment } from 'vue-frag'
import { join } from 'path'
import { showError, showSuccess } from '@nextcloud/dialogs'
import { translate } from '@nextcloud/l10n'
@@ -115,7 +115,6 @@ import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js'
import NcActions from '@nextcloud/vue/dist/Components/NcActions.js'
import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'
import NcLoadingIcon from '@nextcloud/vue/dist/Components/NcLoadingIcon.js'
-import isMobileMixin from '@nextcloud/vue/dist/Mixins/isMobile.js'
import Vue from 'vue'
import { getFileActions } from '../services/FileAction.ts'
@@ -147,10 +146,6 @@ export default Vue.extend({
NcLoadingIcon,
},
- mixins: [
- isMobileMixin,
- ],
-
props: {
active: {
type: Boolean,
@@ -172,6 +167,10 @@ export default Vue.extend({
type: Array,
required: true,
},
+ filesListWidth: {
+ type: Number,
+ default: 0,
+ },
},
setup() {
@@ -207,6 +206,10 @@ export default Vue.extend({
},
columns() {
+ // Hide columns if the list is too small
+ if (this.filesListWidth < 512) {
+ return []
+ }
return this.currentView?.columns || []
},
@@ -300,14 +303,14 @@ export default Vue.extend({
},
enabledInlineActions() {
- if (this.isMobile) {
+ if (this.filesListWidth < 768) {
return []
}
return this.enabledActions.filter(action => action?.inline?.(this.source, this.currentView))
},
enabledMenuActions() {
- if (this.isMobile) {
+ if (this.filesListWidth < 768) {
return this.enabledActions
}