mirror of
https://github.com/netzbegruenung/groupfolders.git
synced 2024-05-08 04:03:40 +02:00
Use new sidebar api to register groupfolders section
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
ee4757ea16
commit
100b1782e4
|
@ -129,13 +129,13 @@
|
|||
|
||||
export default {
|
||||
name: 'SharingSidebarView',
|
||||
props: ['fileModel'],
|
||||
props: ['fileInfo'],
|
||||
components: {
|
||||
Avatar, Multiselect, AclStateButton
|
||||
},
|
||||
beforeMount () {
|
||||
this.loading = true;
|
||||
this.model = JSON.parse(JSON.stringify(this.fileModel));
|
||||
this.model = JSON.parse(JSON.stringify(this.fileInfo));
|
||||
client.propFind(this.model).then((data) => {
|
||||
if (data.acls) {
|
||||
this.list = data.acls;
|
||||
|
|
40
src/files.js
40
src/files.js
|
@ -20,6 +20,9 @@
|
|||
*
|
||||
*/
|
||||
|
||||
__webpack_nonce__ = btoa(OC.requestToken);
|
||||
__webpack_public_path__ = OC.linkTo('groupfolders', 'build/');
|
||||
|
||||
(function(OC, OCA) {
|
||||
OC.Plugins.register('OCA.Files.App', {
|
||||
attach: () => {
|
||||
|
@ -30,30 +33,15 @@
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
__webpack_nonce__ = btoa(OC.requestToken);
|
||||
__webpack_public_path__ = OC.linkTo('groupfolders', 'build/');
|
||||
|
||||
var ShareTabPlugin = {
|
||||
attach: function (shareTabView) {
|
||||
shareTabView.on('rendered', function() {
|
||||
if (this.model && this.model.get('mountType') === 'group') {
|
||||
|
||||
const el = document.createElement('div');
|
||||
const container = shareTabView.$el.find('.dialogContainer')[0];
|
||||
container.parentNode.insertBefore(el, container.nextSibling);
|
||||
el.id = 'groupfolder-sharing';
|
||||
import(/* webpackChunkName: "sharing" */'./SharingSidebarApp').then((Module) => {
|
||||
const View = Module.default;
|
||||
const vm = new View({
|
||||
propsData: {
|
||||
fileModel: this.model
|
||||
}
|
||||
}).$mount(el);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
OC.Plugins.register('OCA.Sharing.ShareTabView', ShareTabPlugin);
|
||||
})(OC, OCA);
|
||||
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
import(/*c webpackChunkName: "sharing" */'./SharingSidebarApp').then((Module) => {
|
||||
OCA.Sharing.ShareTabSections.registerSection((el, fileInfo) => {
|
||||
if (fileInfo.mountType !== 'group') {
|
||||
return
|
||||
}
|
||||
return Module.default
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue