Use nextcloud-vue-collection 0.1.2
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
55cd9eab03
commit
37e6488206
|
@ -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
|
||||
};
|
||||
|
|
|
@ -87,7 +87,6 @@
|
|||
var vm = new Resources.Vue({
|
||||
el: '#collaborationResources',
|
||||
render: h => h(Resources.View),
|
||||
store: Resources.Store(),
|
||||
data: {
|
||||
model: this.model.toJSON()
|
||||
},
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
"nextcloud-axios": "^0.1.3",
|
||||
"nextcloud-password-confirmation": "^0.4.1",
|
||||
"nextcloud-vue": "^0.8.0",
|
||||
"nextcloud-vue-collections": "^0.1.0",
|
||||
"nextcloud-vue-collections": "^0.1.2",
|
||||
"snap.js": "^2.0.9",
|
||||
"strengthify": "git+https://github.com/MorrisJobke/strengthify.git",
|
||||
"underscore": "^1.9.1",
|
||||
|
|
Loading…
Reference in New Issue