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:
Diffstat (limited to 'src/mixins/menubar.js')
-rw-r--r--src/mixins/menubar.js42
1 files changed, 35 insertions, 7 deletions
diff --git a/src/mixins/menubar.js b/src/mixins/menubar.js
index 4070e599e..c23c9c0c8 100644
--- a/src/mixins/menubar.js
+++ b/src/mixins/menubar.js
@@ -169,13 +169,41 @@ export default [
},
{
label: t('text', 'Custom Container'),
- // keyChar: '>',
- // keyModifiers: ['ctrl'],
- class: 'icon-info',
- isActive: 'customContainer',
- action: (command) => {
- return command.toggleCustomContainer()
- },
+ visible: false,
+ children: [
+ {
+ label: t('text', 'Info'),
+ class: 'icon-info',
+ isActive: ['customContainer', { type: 'info' }],
+ action: (command) => {
+ return command.toggleCustomContainer({ type: 'info' })
+ },
+ },
+ {
+ label: t('text', 'Success'),
+ class: 'icon-success',
+ isActive: ['customContainer', { type: 'success' }],
+ action: (command) => {
+ return command.toggleCustomContainer({ type: 'success' })
+ },
+ },
+ {
+ label: t('text', 'Warning'),
+ class: 'icon-warn',
+ isActive: ['customContainer', { type: 'warn' }],
+ action: (command) => {
+ return command.toggleCustomContainer({ type: 'warn' })
+ },
+ },
+ {
+ label: t('text', 'Error'),
+ class: 'icon-error',
+ isActive: ['customContainer', { type: 'error' }],
+ action: (command) => {
+ return command.toggleCustomContainer({ type: 'error' })
+ },
+ },
+ ],
},
{
label: t('text', 'Code block'),