Browse Source

Replace old usage of 'editable' manifest setting with 'static'

master
Andrew Kingston 5 years ago
parent
commit
9b988b60b0
  1. 8
      packages/builder/src/components/design/NavigationPanel/ComponentDropdownMenu.svelte
  2. 2
      packages/client/manifest.json

8
packages/builder/src/components/design/NavigationPanel/ComponentDropdownMenu.svelte

@ -13,6 +13,12 @@
$: noChildrenAllowed = !component || !definition?.hasChildren $: noChildrenAllowed = !component || !definition?.hasChildren
$: noPaste = !$store.componentToPaste $: noPaste = !$store.componentToPaste
// "editable" has been repurposed for inline text editing.
// It remains here for legacy compatibility.
// Future components should define "static": true for indicate they should
// not show a context menu.
$: showMenu = definition?.editable !== false && definition?.static !== true
const moveUpComponent = () => { const moveUpComponent = () => {
const asset = get(currentAsset) const asset = get(currentAsset)
const parent = findComponentParent(asset.props, component._id) const parent = findComponentParent(asset.props, component._id)
@ -69,7 +75,7 @@
} }
</script> </script>
{#if definition?.editable !== false} {#if showMenu}
<ActionMenu> <ActionMenu>
<div slot="control" class="icon"> <div slot="control" class="icon">
<Icon size="S" hoverable name="MoreSmallList" /> <Icon size="S" hoverable name="MoreSmallList" />

2
packages/client/manifest.json

@ -240,7 +240,7 @@
"name": "Screenslot", "name": "Screenslot",
"icon": "WebPage", "icon": "WebPage",
"description": "Contains your app screens", "description": "Contains your app screens",
"editable": false "static": true
}, },
"button": { "button": {
"name": "Button", "name": "Button",

Loading…
Cancel
Save