summaryrefslogtreecommitdiffstats
path: root/apps/files/src
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-01-16 00:03:29 +0100
committerJulius Härtl <jus@bitgrid.net>2020-01-22 17:33:49 +0100
commit05742c083c039561841d258a69fd47dd84debfd6 (patch)
tree46f335a05149165b657fc2c4c61f162f93533361 /apps/files/src
parenta6a224e7a14faa8814e9ce783f626666828b96db (diff)
downloadnextcloud-server-05742c083c039561841d258a69fd47dd84debfd6.tar.gz
nextcloud-server-05742c083c039561841d258a69fd47dd84debfd6.zip
Migrate to @nextcloud/vue 1.x.x
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/src')
-rw-r--r--apps/files/src/components/LegacyTab.vue2
-rw-r--r--apps/files/src/components/TransferOwnershipDialogue.vue2
-rw-r--r--apps/files/src/views/Sidebar.vue33
3 files changed, 33 insertions, 4 deletions
diff --git a/apps/files/src/components/LegacyTab.vue b/apps/files/src/components/LegacyTab.vue
index e358499cb69..32c644ed806 100644
--- a/apps/files/src/components/LegacyTab.vue
+++ b/apps/files/src/components/LegacyTab.vue
@@ -26,7 +26,7 @@
:active-tab="activeTab" />
</template>
<script>
-import AppSidebarTab from 'nextcloud-vue/dist/Components/AppSidebarTab'
+import AppSidebarTab from '@nextcloud/vue/dist/Components/AppSidebarTab'
export default {
name: 'LegacyTab',
diff --git a/apps/files/src/components/TransferOwnershipDialogue.vue b/apps/files/src/components/TransferOwnershipDialogue.vue
index f11c4b6bb82..5a897d4d924 100644
--- a/apps/files/src/components/TransferOwnershipDialogue.vue
+++ b/apps/files/src/components/TransferOwnershipDialogue.vue
@@ -70,7 +70,7 @@ import axios from '@nextcloud/axios'
import debounce from 'debounce'
import { generateOcsUrl } from '@nextcloud/router'
import { getFilePickerBuilder } from '@nextcloud/dialogs'
-import { Multiselect } from 'nextcloud-vue/dist/Components/Multiselect'
+import { Multiselect } from '@nextcloud/vue/dist/Components/Multiselect'
import Vue from 'vue'
import logger from '../logger'
diff --git a/apps/files/src/views/Sidebar.vue b/apps/files/src/views/Sidebar.vue
index 5f07138ea80..c55e1671178 100644
--- a/apps/files/src/views/Sidebar.vue
+++ b/apps/files/src/views/Sidebar.vue
@@ -73,8 +73,8 @@
<script>
import $ from 'jquery'
import axios from '@nextcloud/axios'
-import AppSidebar from 'nextcloud-vue/dist/Components/AppSidebar'
-import ActionButton from 'nextcloud-vue/dist/Components/ActionButton'
+import AppSidebar from '@nextcloud/vue/dist/Components/AppSidebar'
+import ActionButton from '@nextcloud/vue/dist/Components/ActionButton'
import FileInfo from '../services/FileInfo'
import LegacyTab from '../components/LegacyTab'
import LegacyView from '../components/LegacyView'
@@ -240,6 +240,35 @@ export default {
},
},
+ watch: {
+ // update the sidebar data
+ async file(curr, prev) {
+ this.resetData()
+ if (curr && curr.trim() !== '') {
+ try {
+ this.fileInfo = await FileInfo(this.davPath)
+ // adding this as fallback because other apps expect it
+ this.fileInfo.dir = this.file.split('/').slice(0, -1).join('/')
+
+ // DEPRECATED legacy views
+ // TODO: remove
+ this.views.forEach(view => {
+ view.setFileInfo(this.fileInfo)
+ })
+
+ this.$nextTick(() => {
+ if (this.$refs.sidebar) {
+ this.$refs.sidebar.updateTabs()
+ }
+ })
+ } catch (error) {
+ this.error = t('files', 'Error while loading the file data')
+ console.error('Error while loading the file data', error)
+ }
+ }
+ },
+ },
+
methods: {
/**
* Can this tab be displayed ?