From 7b0f9a19de91cc8f5575c68542ba482b0cab73ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=8Carodej?= Date: Tue, 8 Feb 2022 12:58:47 +0100 Subject: [PATCH] Shared pages refactoring part 2 --- public/mix-manifest.json | 3 +- .../FilePreview/FilePreviewMedia.vue | 14 +- .../FilePreview/FilePreviewToolbar.vue | 2 +- .../FilesView/DesktopSharepageToolbar.vue | 133 ++++++++++++++++++ .../components/FilesView/DesktopToolbar.vue | 3 - .../FilesView/FileActionsMobile.vue | 6 +- .../js/components/FilesView/InfoSidebar.vue | 2 +- .../js/components/FilesView/NavigationBar.vue | 12 +- .../js/components/Spotlight/Spotlight.vue | 64 +++++---- resources/js/store/modules/app.js | 5 +- .../Components/NavigationSharePanel.vue | 114 ++++++--------- .../Components/PanelNavigationFiles.vue | 5 +- resources/js/views/FileView/Public.vue | 11 +- resources/js/views/Shared.vue | 8 +- ...VisitorSearchFilesAndFoldersController.php | 45 +++--- 15 files changed, 273 insertions(+), 154 deletions(-) create mode 100644 resources/js/components/FilesView/DesktopSharepageToolbar.vue diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 22e259ae..206101d4 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -72,5 +72,6 @@ "/js/chunks/invitation.js": "/js/chunks/invitation.js", "/css/tailwind.css": "/css/tailwind.css", "/css/app.css": "/css/app.css", - "/js/chunks/app-adsense.js": "/js/chunks/app-adsense.js" + "/js/chunks/app-adsense.js": "/js/chunks/app-adsense.js", + "/js/chunks/shared/browser.js": "/js/chunks/shared/browser.js" } diff --git a/resources/js/components/FilePreview/FilePreviewMedia.vue b/resources/js/components/FilePreview/FilePreviewMedia.vue index dbea8c3d..64e3bdb8 100644 --- a/resources/js/components/FilePreview/FilePreviewMedia.vue +++ b/resources/js/components/FilePreview/FilePreviewMedia.vue @@ -3,11 +3,11 @@
-
+
-
+
@@ -148,11 +148,13 @@ export default { }) // Scroll to the selected item - this.$nextTick(() => { - let element = document.getElementById(`group-${this.files[this.currentIndex].data.id}`) + if (this.$isMobile()) { + this.$nextTick(() => { + let element = document.getElementById(`group-${this.files[this.currentIndex].data.id}`) - this.$refs.scrollBox.scrollLeft = element.getBoundingClientRect().left - }) + this.$refs.scrollBox.scrollLeft = element.getBoundingClientRect().left + }) + } }, next() { if (!this.files.length > 1) return diff --git a/resources/js/components/FilePreview/FilePreviewToolbar.vue b/resources/js/components/FilePreview/FilePreviewToolbar.vue index 393939d7..f6af0671 100644 --- a/resources/js/components/FilePreview/FilePreviewToolbar.vue +++ b/resources/js/components/FilePreview/FilePreviewToolbar.vue @@ -1,5 +1,5 @@