[tiny] rename show menu paste (#1332)
This PR renames `showUiPaste` to `showMenuPaste`, since we use `MENU_PASTE` elsewhere.
This commit is contained in:
parent
0800dbe087
commit
2a36d6342c
3 changed files with 5 additions and 5 deletions
|
@ -194,7 +194,7 @@ function _findMenuItem(menu: MenuSchema | MenuChild[], path: string[]): MenuChil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const showUiPaste =
|
export const showMenuPaste =
|
||||||
typeof window !== 'undefined' &&
|
typeof window !== 'undefined' &&
|
||||||
'navigator' in window &&
|
'navigator' in window &&
|
||||||
Boolean(navigator.clipboard) &&
|
Boolean(navigator.clipboard) &&
|
||||||
|
|
|
@ -8,7 +8,7 @@ import {
|
||||||
menuItem,
|
menuItem,
|
||||||
MenuSchema,
|
MenuSchema,
|
||||||
menuSubmenu,
|
menuSubmenu,
|
||||||
showUiPaste,
|
showMenuPaste,
|
||||||
useAllowGroup,
|
useAllowGroup,
|
||||||
useAllowUngroup,
|
useAllowUngroup,
|
||||||
useThreeStackableItems,
|
useThreeStackableItems,
|
||||||
|
@ -163,7 +163,7 @@ export const ContextMenuSchemaProvider = track(function ContextMenuSchemaProvide
|
||||||
'clipboard-group',
|
'clipboard-group',
|
||||||
oneSelected && menuItem(actions['cut']),
|
oneSelected && menuItem(actions['cut']),
|
||||||
oneSelected && menuItem(actions['copy']),
|
oneSelected && menuItem(actions['copy']),
|
||||||
showUiPaste && menuCustom('MENU_PASTE', { readonlyOk: false })
|
showMenuPaste && menuCustom('MENU_PASTE', { readonlyOk: false })
|
||||||
),
|
),
|
||||||
atLeastOneShapeOnPage &&
|
atLeastOneShapeOnPage &&
|
||||||
menuGroup(
|
menuGroup(
|
||||||
|
|
|
@ -8,7 +8,7 @@ import {
|
||||||
menuGroup,
|
menuGroup,
|
||||||
menuItem,
|
menuItem,
|
||||||
menuSubmenu,
|
menuSubmenu,
|
||||||
showUiPaste,
|
showMenuPaste,
|
||||||
useAllowGroup,
|
useAllowGroup,
|
||||||
useAllowUngroup,
|
useAllowUngroup,
|
||||||
} from './menuHelpers'
|
} from './menuHelpers'
|
||||||
|
@ -100,7 +100,7 @@ export function MenuSchemaProvider({ overrides, children }: MenuSchemaProviderPr
|
||||||
{
|
{
|
||||||
id: 'MENU_PASTE',
|
id: 'MENU_PASTE',
|
||||||
type: 'custom',
|
type: 'custom',
|
||||||
disabled: !showUiPaste,
|
disabled: !showMenuPaste,
|
||||||
readonlyOk: false,
|
readonlyOk: false,
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue