Skip to content

Commit

Permalink
fix(menu): Move heading left of bold, links and attachments neighbors
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas <jonas@freesources.org>
  • Loading branch information
mejo- committed Sep 17, 2024
1 parent 9993451 commit 799ae6c
Showing 1 changed file with 65 additions and 65 deletions.
130 changes: 65 additions & 65 deletions src/components/Menu/entries.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default [
keyModifiers: [MODIFIERS.Mod],
icon: Undo,
action: (command) => command.undo(),
priority: 8,
priority: 7,
},
{
key: 'redo',
Expand All @@ -69,56 +69,8 @@ export default [
keyModifiers: [MODIFIERS.Mod],
icon: Redo,
action: (command) => command.redo(),
priority: 11,
},
{
key: 'bold',
label: t('text', 'Bold'),
keyChar: 'b',
keyModifiers: [MODIFIERS.Mod],
icon: FormatBold,
isActive: 'strong',
action: (command) => {
return command.toggleBold()
},
priority: 9,
},
{
key: 'italic',
label: t('text', 'Italic'),
keyChar: 'i',
keyModifiers: [MODIFIERS.Mod],
icon: FormatItalic,
isActive: 'em',
action: (command) => {
return command.toggleItalic()
},
priority: 10,
},
{
key: 'underline',
label: t('text', 'Underline'),
keyChar: 'u',
keyModifiers: [MODIFIERS.Mod],
icon: FormatUnderline,
isActive: 'underline',
action: (command) => {
return command.toggleUnderline()
},
priority: 12,
},
{
key: 'strikethrough',
label: t('text', 'Strikethrough'),
keyChar: 's',
keyModifiers: [MODIFIERS.Mod, MODIFIERS.Shift],
icon: FormatStrikethrough,
isActive: 'strike',
action: (command) => {
return command.toggleStrike()
},
priority: 13,
},
{
key: 'headings',
label: t('text', 'Headings'),
Expand Down Expand Up @@ -216,6 +168,54 @@ export default [
],
priority: 1,
},
{
key: 'bold',
label: t('text', 'Bold'),
keyChar: 'b',
keyModifiers: [MODIFIERS.Mod],
icon: FormatBold,
isActive: 'strong',
action: (command) => {
return command.toggleBold()
},
priority: 8,
},
{
key: 'italic',
label: t('text', 'Italic'),
keyChar: 'i',
keyModifiers: [MODIFIERS.Mod],
icon: FormatItalic,
isActive: 'em',
action: (command) => {
return command.toggleItalic()
},
priority: 9,
},
{
key: 'underline',
label: t('text', 'Underline'),
keyChar: 'u',
keyModifiers: [MODIFIERS.Mod],
icon: FormatUnderline,
isActive: 'underline',
action: (command) => {
return command.toggleUnderline()
},
priority: 11,
},
{
key: 'strikethrough',
label: t('text', 'Strikethrough'),
keyChar: 's',
keyModifiers: [MODIFIERS.Mod, MODIFIERS.Shift],
icon: FormatStrikethrough,
isActive: 'strike',
action: (command) => {
return command.toggleStrike()
},
priority: 12,
},
{
key: 'lists',
label: t('text', 'Lists'),
Expand Down Expand Up @@ -367,15 +367,7 @@ export default [
action: (command) => {
return command.insertTable()
},
priority: 4,
},
{
key: 'insert-link',
label: t('text', 'Insert link'),
isActive: 'link',
icon: LinkIcon,
component: ActionInsertLink,
priority: 5,
priority: 13,
},
{
key: 'details',
Expand All @@ -387,6 +379,21 @@ export default [
},
priority: 14,
},
{
key: 'insert-link',
label: t('text', 'Insert link'),
isActive: 'link',
icon: LinkIcon,
component: ActionInsertLink,
priority: 4,
},
{
key: 'insert-attachment',
label: t('text', 'Insert attachment'),
icon: Paperclip,
component: ActionAttachmentUpload,
priority: 5,
},
{
key: 'emoji-picker',
label: t('text', 'Insert emoji'),
Expand All @@ -397,11 +404,4 @@ export default [
},
priority: 6,
},
{
key: 'insert-attachment',
label: t('text', 'Insert attachment'),
icon: Paperclip,
component: ActionAttachmentUpload,
priority: 7,
},
]

0 comments on commit 799ae6c

Please sign in to comment.