|
|
|
@ -1,5 +1,4 @@ |
|
|
|
<script> |
|
|
|
import { MoreIcon } from "components/common/Icons" |
|
|
|
import { store } from "builderStore" |
|
|
|
import { getComponentDefinition } from "builderStore/storeUtils" |
|
|
|
import ConfirmDialog from "components/common/ConfirmDialog.svelte" |
|
|
|
@ -109,9 +108,9 @@ |
|
|
|
</script> |
|
|
|
|
|
|
|
<div bind:this={anchor} on:click|stopPropagation={() => {}}> |
|
|
|
<button on:click={dropdown.show}> |
|
|
|
<MoreIcon /> |
|
|
|
</button> |
|
|
|
<div class="icon" on:click={dropdown.show}> |
|
|
|
<i class="ri-more-line" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<DropdownMenu |
|
|
|
class="menu" |
|
|
|
@ -122,27 +121,27 @@ |
|
|
|
align="left"> |
|
|
|
<ul> |
|
|
|
<li class="item" on:click={() => confirmDeleteDialog.show()}> |
|
|
|
<i class="icon ri-delete-bin-2-line" /> |
|
|
|
<i class="ri-delete-bin-2-line" /> |
|
|
|
Delete |
|
|
|
</li> |
|
|
|
<li class="item" on:click={moveUpComponent}> |
|
|
|
<i class="icon ri-arrow-up-line" /> |
|
|
|
<i class="ri-arrow-up-line" /> |
|
|
|
Move up |
|
|
|
</li> |
|
|
|
<li class="item" on:click={moveDownComponent}> |
|
|
|
<i class="icon ri-arrow-down-line" /> |
|
|
|
<i class="ri-arrow-down-line" /> |
|
|
|
Move down |
|
|
|
</li> |
|
|
|
<li class="item" on:click={copyComponent}> |
|
|
|
<i class="icon ri-repeat-one-line" /> |
|
|
|
<i class="ri-repeat-one-line" /> |
|
|
|
Duplicate |
|
|
|
</li> |
|
|
|
<li class="item" on:click={() => storeComponentForCopy(true)}> |
|
|
|
<i class="icon ri-scissors-cut-line" /> |
|
|
|
<i class="ri-scissors-cut-line" /> |
|
|
|
Cut |
|
|
|
</li> |
|
|
|
<li class="item" on:click={() => storeComponentForCopy(false)}> |
|
|
|
<i class="icon ri-file-copy-line" /> |
|
|
|
<i class="ri-file-copy-line" /> |
|
|
|
Copy |
|
|
|
</li> |
|
|
|
<hr class="hr-style" /> |
|
|
|
@ -150,21 +149,21 @@ |
|
|
|
class="item" |
|
|
|
class:disabled={noPaste} |
|
|
|
on:click={() => pasteComponent('above')}> |
|
|
|
<i class="icon ri-insert-row-top" /> |
|
|
|
<i class="ri-insert-row-top" /> |
|
|
|
Paste above |
|
|
|
</li> |
|
|
|
<li |
|
|
|
class="item" |
|
|
|
class:disabled={noPaste} |
|
|
|
on:click={() => pasteComponent('below')}> |
|
|
|
<i class="icon ri-insert-row-bottom" /> |
|
|
|
<i class="ri-insert-row-bottom" /> |
|
|
|
Paste below |
|
|
|
</li> |
|
|
|
<li |
|
|
|
class="item" |
|
|
|
class:disabled={noPaste || noChildrenAllowed} |
|
|
|
on:click={() => pasteComponent('inside')}> |
|
|
|
<i class="icon ri-insert-column-right" /> |
|
|
|
<i class="ri-insert-column-right" /> |
|
|
|
Paste inside |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
@ -181,7 +180,7 @@ |
|
|
|
ul { |
|
|
|
list-style: none; |
|
|
|
padding: 0; |
|
|
|
margin: var(--spacing-xs) 0; |
|
|
|
margin: var(--spacing-s) 0; |
|
|
|
} |
|
|
|
|
|
|
|
li { |
|
|
|
@ -190,44 +189,29 @@ |
|
|
|
font-size: var(--font-size-xs); |
|
|
|
color: var(--ink); |
|
|
|
padding: var(--spacing-s) var(--spacing-m); |
|
|
|
margin: auto 0px; |
|
|
|
margin: auto 0; |
|
|
|
align-items: center; |
|
|
|
cursor: pointer; |
|
|
|
} |
|
|
|
|
|
|
|
button { |
|
|
|
border-style: none; |
|
|
|
border-radius: 2px; |
|
|
|
padding: 0; |
|
|
|
background: transparent; |
|
|
|
cursor: pointer; |
|
|
|
color: var(--ink); |
|
|
|
outline: none; |
|
|
|
} |
|
|
|
|
|
|
|
li:hover { |
|
|
|
li:not(.disabled):hover { |
|
|
|
background-color: var(--grey-2); |
|
|
|
} |
|
|
|
|
|
|
|
li:active { |
|
|
|
color: var(--blue); |
|
|
|
} |
|
|
|
|
|
|
|
.item { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
font-size: 14px; |
|
|
|
} |
|
|
|
|
|
|
|
.icon { |
|
|
|
li i { |
|
|
|
margin-right: 8px; |
|
|
|
font-size: var(--font-size-s); |
|
|
|
} |
|
|
|
|
|
|
|
.disabled { |
|
|
|
li.disabled { |
|
|
|
color: var(--grey-4); |
|
|
|
cursor: default; |
|
|
|
} |
|
|
|
|
|
|
|
.icon i { |
|
|
|
font-size: 16px; |
|
|
|
} |
|
|
|
|
|
|
|
.hr-style { |
|
|
|
margin: 8px 0; |
|
|
|
color: var(--grey-4); |
|
|
|
|