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

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-06-15 12:05:38 +0300
committerJulius Härtl <jus@bitgrid.net>2019-06-15 12:05:38 +0300
commit1bf1660e84c84039036851cea627573cf77c9494 (patch)
treec84aa206c38f8d5266c444d7121e4399007e4a5f /src/mixins
parent90d57b2353e4acbc36cc8ef784fe37f6c184342d (diff)
Fix file picker modal
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src/mixins')
-rw-r--r--src/mixins/menubar.js26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/mixins/menubar.js b/src/mixins/menubar.js
index e40210cb0..4130223bd 100644
--- a/src/mixins/menubar.js
+++ b/src/mixins/menubar.js
@@ -152,14 +152,6 @@ const icons = [
action: (command) => {
return command.code_block()
}
- },
- {
- label: 'Insert image',
- class: 'icon-image',
- isActive: () => {},
- click: (commands) => {
- this.showImagePrompt(commands.image)
- }
}
]
@@ -223,11 +215,25 @@ const iconBar = {
return this.submenuVisibility.hasOwnProperty(icon.label) ? this.submenuVisibility[icon.label] : false
}
},
+ allIcons() {
+ if (this.isPublic) {
+ return icons
+ }
+ return [...icons, {
+ label: 'Insert image',
+ class: 'icon-image',
+ isActive: () => {
+ },
+ action: (commands) => {
+ this.showImagePrompt(commands.image)
+ }
+ }]
+ },
iconsToShow() {
- return icons.slice(0, (this.iconCount - 1 > 0) ? this.iconCount - 1 : 0)
+ return this.allIcons.slice(0, (this.iconCount - 1 > 0) ? this.iconCount - 1 : 0)
},
iconsToShowInMenu() {
- return icons.slice((this.iconCount - 1 > 0) ? this.iconCount - 1 : 0, icons.length)
+ return this.allIcons.slice((this.iconCount - 1 > 0) ? this.iconCount - 1 : 0, this.allIcons.length)
},
childPopoverMenu() {
return (isActive, commands, icons, parent) => {