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 Vue from 'vue';
|
||||||
import Vuex from 'vuex';
|
|
||||||
import { PopoverMenu } from 'nextcloud-vue';
|
import { PopoverMenu } from 'nextcloud-vue';
|
||||||
import ClickOutside from 'vue-click-outside';
|
import ClickOutside from 'vue-click-outside';
|
||||||
import { VTooltip } from 'v-tooltip';
|
import { VTooltip } from 'v-tooltip';
|
||||||
import { CollectionStoreModule } from 'nextcloud-vue-collections';
|
|
||||||
|
|
||||||
const Store = () => new Vuex.Store(CollectionStoreModule);
|
|
||||||
|
|
||||||
|
|
||||||
Vue.prototype.t = t;
|
Vue.prototype.t = t;
|
||||||
|
|
||||||
Vue.component('PopoverMenu', PopoverMenu);
|
Vue.component('PopoverMenu', PopoverMenu);
|
||||||
Vue.directive('ClickOutside', ClickOutside);
|
Vue.directive('ClickOutside', ClickOutside);
|
||||||
Vue.directive('Tooltip', VTooltip);
|
Vue.directive('Tooltip', VTooltip);
|
||||||
Vue.use(Vuex);
|
|
||||||
|
|
||||||
import View from './views/CollaborationView';
|
import View from './views/CollaborationView';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
Vue,
|
Vue,
|
||||||
View,
|
View
|
||||||
Store
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -87,7 +87,6 @@
|
||||||
var vm = new Resources.Vue({
|
var vm = new Resources.Vue({
|
||||||
el: '#collaborationResources',
|
el: '#collaborationResources',
|
||||||
render: h => h(Resources.View),
|
render: h => h(Resources.View),
|
||||||
store: Resources.Store(),
|
|
||||||
data: {
|
data: {
|
||||||
model: this.model.toJSON()
|
model: this.model.toJSON()
|
||||||
},
|
},
|
||||||
|
|
|
@ -21,14 +21,35 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<collection-list type="files"></collection-list>
|
<collection-list v-if="fileId" type="files" :id="fileId" :name="filename"></collection-list>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { CollectionList } from 'nextcloud-vue-collections'
|
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 {
|
export default {
|
||||||
name: 'CollaborationView',
|
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: {
|
components: {
|
||||||
CollectionList
|
CollectionList
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
"nextcloud-axios": "^0.1.3",
|
"nextcloud-axios": "^0.1.3",
|
||||||
"nextcloud-password-confirmation": "^0.4.1",
|
"nextcloud-password-confirmation": "^0.4.1",
|
||||||
"nextcloud-vue": "^0.8.0",
|
"nextcloud-vue": "^0.8.0",
|
||||||
"nextcloud-vue-collections": "^0.1.0",
|
"nextcloud-vue-collections": "^0.1.2",
|
||||||
"snap.js": "^2.0.9",
|
"snap.js": "^2.0.9",
|
||||||
"strengthify": "git+https://github.com/MorrisJobke/strengthify.git",
|
"strengthify": "git+https://github.com/MorrisJobke/strengthify.git",
|
||||||
"underscore": "^1.9.1",
|
"underscore": "^1.9.1",
|
||||||
|
|
Loading…
Reference in New Issue