diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-02-22 13:37:40 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-03-01 20:57:00 +0100 |
commit | 37e6488206d119ff99fbeab2fd77fe1f22d7ddee (patch) | |
tree | 0d0fa2581b62eed6473f44423205d20c1bdfd622 /apps | |
parent | 55cd9eab03aeaf30b743fa2e4fd8789588188fd1 (diff) | |
download | nextcloud-server-37e6488206d119ff99fbeab2fd77fe1f22d7ddee.tar.gz nextcloud-server-37e6488206d119ff99fbeab2fd77fe1f22d7ddee.zip |
Use nextcloud-vue-collection 0.1.2
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/src/collaborationresources.js | 9 | ||||
-rw-r--r-- | apps/files_sharing/src/sharetabview.js | 1 | ||||
-rw-r--r-- | apps/files_sharing/src/views/CollaborationView.vue | 23 |
3 files changed, 23 insertions, 10 deletions
diff --git a/apps/files_sharing/src/collaborationresources.js b/apps/files_sharing/src/collaborationresources.js index ce53d0cd936..8fd0004f897 100644 --- a/apps/files_sharing/src/collaborationresources.js +++ b/apps/files_sharing/src/collaborationresources.js @@ -21,26 +21,19 @@ */ import Vue from 'vue'; -import Vuex from 'vuex'; import { PopoverMenu } from 'nextcloud-vue'; import ClickOutside from 'vue-click-outside'; import { VTooltip } from 'v-tooltip'; -import { CollectionStoreModule } from 'nextcloud-vue-collections'; - -const Store = () => new Vuex.Store(CollectionStoreModule); - Vue.prototype.t = t; Vue.component('PopoverMenu', PopoverMenu); Vue.directive('ClickOutside', ClickOutside); Vue.directive('Tooltip', VTooltip); -Vue.use(Vuex); import View from './views/CollaborationView'; export { Vue, - View, - Store + View }; diff --git a/apps/files_sharing/src/sharetabview.js b/apps/files_sharing/src/sharetabview.js index 275a79198cc..44c863fbe9e 100644 --- a/apps/files_sharing/src/sharetabview.js +++ b/apps/files_sharing/src/sharetabview.js @@ -87,7 +87,6 @@ var vm = new Resources.Vue({ el: '#collaborationResources', render: h => h(Resources.View), - store: Resources.Store(), data: { model: this.model.toJSON() }, diff --git a/apps/files_sharing/src/views/CollaborationView.vue b/apps/files_sharing/src/views/CollaborationView.vue index 1c1cdd7c3e7..6a64abb1467 100644 --- a/apps/files_sharing/src/views/CollaborationView.vue +++ b/apps/files_sharing/src/views/CollaborationView.vue @@ -21,14 +21,35 @@ --> <template> - <collection-list type="files"></collection-list> + <collection-list v-if="fileId" type="files" :id="fileId" :name="filename"></collection-list> </template> <script> import { CollectionList } from 'nextcloud-vue-collections' + /** + * Those translations will be used by the vue component but they should be shipped with the server + * t('files_sharing', 'Add to a collection') + * t('files_sharing', 'Details') + * t('files_sharing', 'Rename collection') + */ + export default { name: 'CollaborationView', + computed: { + fileId() { + if (this.$root.model && this.$root.model.id) { + return '' + this.$root.model.id; + } + return null; + }, + filename() { + if (this.$root.model && this.$root.model.name) { + return '' + this.$root.model.name; + } + return ''; + } + }, components: { CollectionList } |