1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

Mobile: Add "swap line up" and "swap line down" to toolbar extended options (#12053)

This commit is contained in:
Henry Heino
2025-04-07 12:02:06 -07:00
committed by GitHub
parent d4fafd74d2
commit 04196e4485
3 changed files with 15 additions and 0 deletions

View File

@@ -22,6 +22,8 @@ const builtInCommandNames = [
'-',
EditorCommandType.IndentLess,
EditorCommandType.IndentMore,
`editor.${EditorCommandType.SwapLineDown}`,
`editor.${EditorCommandType.SwapLineUp}`,
'-',
'insertDateTime',
'-',

View File

@@ -1,3 +1,4 @@
import { EditorCommandType } from '@joplin/editor/types';
import { AppState } from '../../../utils/types';
import allToolbarCommandNamesFromState from './allToolbarCommandNamesFromState';
import { Platform } from 'react-native';
@@ -7,6 +8,8 @@ const omitFromDefault: string[] = [
'editor.textHeading3',
'editor.textHeading4',
'editor.textHeading5',
`editor.${EditorCommandType.SwapLineDown}`,
`editor.${EditorCommandType.SwapLineUp}`,
];
// The "hide keyboard" button is only needed on iOS, so only show it there by default.

View File

@@ -97,6 +97,16 @@ const declarations: CommandDeclaration[] = [
label: () => _('Increase indent level'),
iconName: 'ant indent-right',
},
{
name: `editor.${EditorCommandType.SwapLineDown}`,
label: () => _('Swap line down'),
iconName: 'material chevron-double-down',
},
{
name: `editor.${EditorCommandType.SwapLineUp}`,
label: () => _('Swap line up'),
iconName: 'material chevron-double-up',
},
{
name: EditorCommandType.ToggleSearch,
label: () => _('Search'),