quick fixes (#3128)

- Menu items
- keyboard shortcuts dialog menu

### Change Type

- [x] `patch` — Bug fix
This commit is contained in:
Steve Ruiz 2024-03-12 11:50:12 +00:00 committed by GitHub
parent b0210c0d6d
commit 599a6cd484
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 6 additions and 9 deletions

View file

@ -60,7 +60,7 @@ const components: TLComponents = {
const actions = useActions()
return (
<DefaultKeyboardShortcutsDialog {...props}>
<TldrawUiMenuGroup id="shortcuts-dialog.file">
<TldrawUiMenuGroup label="shortcuts-dialog.file" id="file">
<TldrawUiMenuItem {...actions[SAVE_FILE_COPY_ACTION]} />
<TldrawUiMenuItem {...actions[OPEN_FILE_ACTION]} />
</TldrawUiMenuGroup>

View file

@ -80,12 +80,12 @@ const components: TLComponents = {
const actions = useActions()
return (
<DefaultKeyboardShortcutsDialog {...props}>
<TldrawUiMenuGroup id="shortcuts-dialog.file">
<TldrawUiMenuGroup label="shortcuts-dialog.file" id="file">
<TldrawUiMenuItem {...actions[SAVE_FILE_COPY_ACTION]} />
<TldrawUiMenuItem {...actions[OPEN_FILE_ACTION]} />
</TldrawUiMenuGroup>
<DefaultKeyboardShortcutsDialogContent />
<TldrawUiMenuGroup id="shortcuts-dialog.collaboration">
<TldrawUiMenuGroup label="shortcuts-dialog.collaboration" id="collaboration">
<TldrawUiMenuItem {...actions[CURSOR_CHAT_ACTION]} />
</TldrawUiMenuGroup>
</DefaultKeyboardShortcutsDialog>

View file

@ -47,7 +47,7 @@ const components: TLComponents = {
const actions = useActions()
return (
<DefaultKeyboardShortcutsDialog {...props}>
<TldrawUiMenuGroup id="shortcuts-dialog.file">
<TldrawUiMenuGroup label="shortcuts-dialog.file" id="file">
<TldrawUiMenuItem {...actions[SAVE_FILE_COPY_ACTION]} />
</TldrawUiMenuGroup>
<DefaultKeyboardShortcutsDialogContent />

View file

@ -49,7 +49,7 @@ export const EmbedDialog = track(function EmbedDialog({ onClose }: TLUiDialogPro
<TldrawUiDialogBody className="tlui-embed-dialog__enter">
<TldrawUiInput
className="tlui-embed-dialog__input"
label="embed-url"
label="embed-dialog.url"
placeholder="http://example.com"
autofocus
onValueChange={(value) => {

View file

@ -11,6 +11,7 @@ export function DefaultKeyboardShortcutsDialogContent() {
<>
<TldrawUiMenuGroup label="shortcuts-dialog.tools" id="tools">
<TldrawUiMenuItem {...actions['toggle-tool-lock']} />
<TldrawUiMenuItem {...actions['insert-media']} />
<TldrawUiMenuItem {...tools['select']} />
<TldrawUiMenuItem {...tools['draw']} />
<TldrawUiMenuItem {...tools['eraser']} />
@ -24,10 +25,6 @@ export function DefaultKeyboardShortcutsDialogContent() {
<TldrawUiMenuItem {...tools['note']} />
<TldrawUiMenuItem {...tools['laser']} />
</TldrawUiMenuGroup>
<TldrawUiMenuGroup label="shortcuts-dialog.file" id="file">
<TldrawUiMenuItem {...actions['insert-media']} />
<TldrawUiMenuItem {...actions['print']} />
</TldrawUiMenuGroup>
<TldrawUiMenuGroup label="shortcuts-dialog.preferences" id="preferences">
<TldrawUiMenuItem {...actions['toggle-dark-mode']} />
<TldrawUiMenuItem {...actions['toggle-focus-mode']} />