aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/src
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-07-20 12:30:35 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-07-20 12:42:08 +0200
commit6fcd075730dbd63d5dbb69da0ca5983b51a7240e (patch)
tree3b91e443159f6322e9af53bf495c17bd76c0ab7b /apps/files_sharing/src
parentb2e3466005f8fec7a753b078871f54c9fd5debb8 (diff)
downloadnextcloud-server-6fcd075730dbd63d5dbb69da0ca5983b51a7240e.tar.gz
nextcloud-server-6fcd075730dbd63d5dbb69da0ca5983b51a7240e.zip
Use DOMContentLoaded and fix sharebymail loading issue
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing/src')
-rw-r--r--apps/files_sharing/src/components/SharingEntryLink.vue6
-rw-r--r--apps/files_sharing/src/files_sharing_tab.js2
-rw-r--r--apps/files_sharing/src/services/ConfigService.js7
3 files changed, 10 insertions, 5 deletions
diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue
index 67e5e4ae48d..7cf90280d94 100644
--- a/apps/files_sharing/src/components/SharingEntryLink.vue
+++ b/apps/files_sharing/src/components/SharingEntryLink.vue
@@ -26,7 +26,9 @@
:class="isEmailShareType ? 'icon-mail-white' : 'icon-public-white'"
class="sharing-entry__avatar" />
<div class="sharing-entry__desc">
- <h5 :title="title">{{ title }}</h5>
+ <h5 :title="title">
+ {{ title }}
+ </h5>
</div>
<!-- clipboard -->
@@ -410,7 +412,7 @@ export default {
}
if (this.share.label && this.share.label.trim() !== '') {
return t('files_sharing', 'Share link ({label})', {
- label: this.share.label.trim()
+ label: this.share.label.trim(),
})
}
if (this.isEmailShareType) {
diff --git a/apps/files_sharing/src/files_sharing_tab.js b/apps/files_sharing/src/files_sharing_tab.js
index b46bca6fc9e..ffb6cdec30a 100644
--- a/apps/files_sharing/src/files_sharing_tab.js
+++ b/apps/files_sharing/src/files_sharing_tab.js
@@ -34,7 +34,7 @@ Object.assign(window.OCA.Sharing, { ShareSearch: new ShareSearch() })
Object.assign(window.OCA.Sharing, { ExternalLinkActions: new ExternalLinkActions() })
Object.assign(window.OCA.Sharing, { ShareTabSections: new TabSections() })
-window.addEventListener('DOMContentLoaded', () => {
+window.addEventListener('DOMContentLoaded', function() {
if (OCA.Files && OCA.Files.Sidebar) {
OCA.Files.Sidebar.registerTab(new OCA.Files.Sidebar.Tab('sharing', SharingTab))
}
diff --git a/apps/files_sharing/src/services/ConfigService.js b/apps/files_sharing/src/services/ConfigService.js
index 1fcf2810956..727e064e35e 100644
--- a/apps/files_sharing/src/services/ConfigService.js
+++ b/apps/files_sharing/src/services/ConfigService.js
@@ -178,8 +178,11 @@ export default class Config {
* @memberof Config
*/
get isMailShareAllowed() {
- return OC.getCapabilities()['files_sharing']['sharebymail'] !== undefined
- && OC.getCapabilities()['files_sharing']['public']['enabled'] === true
+ const capabilities = OC.getCapabilities()
+ // eslint-disable-next-line camelcase
+ return capabilities?.files_sharing?.sharebymail !== undefined
+ // eslint-disable-next-line camelcase
+ && capabilities?.files_sharing?.public?.enabled === true
}
/**