kopia lustrzana https://github.com/Tldraw/Tldraw
Merge d16e593695
into a319ad9497
commit
3c3e7c0cad
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -39,6 +39,7 @@ export function DefaultKeyboardShortcutsDialogContent() {
|
|||
<TldrawUiMenuItem {...actions['select-all']} />
|
||||
<TldrawUiMenuItem {...actions['delete']} />
|
||||
<TldrawUiMenuItem {...actions['duplicate']} />
|
||||
<TldrawUiMenuItem {...actions['comma-as-pointer']} />
|
||||
</TldrawUiMenuGroup>
|
||||
<TldrawUiMenuGroup label="shortcuts-dialog.view" id="view">
|
||||
<TldrawUiMenuItem {...actions['zoom-in']} />
|
||||
|
|
|
@ -313,6 +313,15 @@ export function ActionsProvider({ overrides, children }: ActionsProviderProps) {
|
|||
copyAs(ids, 'json')
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'comma-as-pointer',
|
||||
kbd: ',',
|
||||
label: 'action.comma-as-pointer',
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
onSelect(source) {
|
||||
// ignore it since it is processed separately in useKeyboardShortcuts
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'toggle-auto-size',
|
||||
label: 'action.toggle-auto-size',
|
||||
|
|
|
@ -24,6 +24,7 @@ export type TLUiTranslationKey =
|
|||
| 'action.copy-as-svg.short'
|
||||
| 'action.copy-as-svg'
|
||||
| 'action.copy'
|
||||
| 'action.comma-as-pointer'
|
||||
| 'action.cut'
|
||||
| 'action.delete'
|
||||
| 'action.unlock-all'
|
||||
|
|
|
@ -25,6 +25,7 @@ export const DEFAULT_TRANSLATION = {
|
|||
'action.copy-as-svg': 'Copy as SVG',
|
||||
'action.copy': 'Copy',
|
||||
'action.cut': 'Cut',
|
||||
'action.comma-as-pointer': 'Comma as Pointer',
|
||||
'action.delete': 'Delete',
|
||||
'action.unlock-all': 'Unlock all',
|
||||
'action.distribute-horizontal': 'Distribute horizontally',
|
||||
|
|
|
@ -7,6 +7,8 @@ const altKey = isDarwin ? '⌥' : 'Alt'
|
|||
|
||||
/** @public */
|
||||
export function kbd(str: string) {
|
||||
if (str === ',') return [',']
|
||||
|
||||
return str
|
||||
.split(',')[0]
|
||||
.split('')
|
||||
|
|
Ładowanie…
Reference in New Issue