Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/groupfolders.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-07-09 15:57:00 +0300
committerJulius Härtl <jus@bitgrid.net>2019-12-05 12:42:16 +0300
commit100b1782e4935a27693f2b03ae261c3b6edbed60 (patch)
tree1f5745a4f0641fae4941f3da43313606254509d9 /src
parentee4757ea16087128f1c1146f964f51672d9e6bc7 (diff)
Use new sidebar api to register groupfolders section
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src')
-rw-r--r--src/components/SharingSidebarView.vue4
-rw-r--r--src/files.js40
2 files changed, 16 insertions, 28 deletions
diff --git a/src/components/SharingSidebarView.vue b/src/components/SharingSidebarView.vue
index 0f7e201a..e24fd9b2 100644
--- a/src/components/SharingSidebarView.vue
+++ b/src/components/SharingSidebarView.vue
@@ -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;
diff --git a/src/files.js b/src/files.js
index 3cb1a46d..338c34ed 100644
--- a/src/files.js
+++ b/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
+ })
+ })
+})