[tiny] rename show menu paste (#1332)

This PR renames `showUiPaste` to `showMenuPaste`, since we use
`MENU_PASTE` elsewhere.
This commit is contained in:
Steve Ruiz 2023-05-08 21:06:10 +01:00 committed by GitHub
parent 0800dbe087
commit 2a36d6342c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -194,7 +194,7 @@ function _findMenuItem(menu: MenuSchema | MenuChild[], path: string[]): MenuChil
}
}
export const showUiPaste =
export const showMenuPaste =
typeof window !== 'undefined' &&
'navigator' in window &&
Boolean(navigator.clipboard) &&

View file

@ -8,7 +8,7 @@ import {
menuItem,
MenuSchema,
menuSubmenu,
showUiPaste,
showMenuPaste,
useAllowGroup,
useAllowUngroup,
useThreeStackableItems,
@ -163,7 +163,7 @@ export const ContextMenuSchemaProvider = track(function ContextMenuSchemaProvide
'clipboard-group',
oneSelected && menuItem(actions['cut']),
oneSelected && menuItem(actions['copy']),
showUiPaste && menuCustom('MENU_PASTE', { readonlyOk: false })
showMenuPaste && menuCustom('MENU_PASTE', { readonlyOk: false })
),
atLeastOneShapeOnPage &&
menuGroup(

View file

@ -8,7 +8,7 @@ import {
menuGroup,
menuItem,
menuSubmenu,
showUiPaste,
showMenuPaste,
useAllowGroup,
useAllowUngroup,
} from './menuHelpers'
@ -100,7 +100,7 @@ export function MenuSchemaProvider({ overrides, children }: MenuSchemaProviderPr
{
id: 'MENU_PASTE',
type: 'custom',
disabled: !showUiPaste,
disabled: !showMenuPaste,
readonlyOk: false,
}
),