diff options
author | Vinicius Reis <vinicius.reis@nextcloud.com> | 2022-03-04 21:27:11 +0300 |
---|---|---|
committer | Vinicius Reis <vinicius.reis@nextcloud.com> | 2022-03-14 17:38:28 +0300 |
commit | ab1f39eedfdadd1528fd0b6505de8cf47829ec4c (patch) | |
tree | 158042584dfaa1ac51e4bbb294ab1c867de4a4c6 /src | |
parent | 79cabea782985eb575d8279680eb349ccbd47dcc (diff) |
✨ (#2184): add warn, error and success custom blocks
also add some css improviments
Signed-off-by: Vinicius Reis <vinicius.reis@nextcloud.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/mixins/menubar.js | 42 |
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'), |