mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-28 20:15:20 +03:00
Fix branch lane context menu
- made it unclickable by mistake
This commit is contained in:
parent
dc6f23ccd3
commit
82b861758c
@ -21,6 +21,7 @@
|
||||
class="menu-item"
|
||||
class:disabled
|
||||
{id}
|
||||
on:click
|
||||
on:click={(e) => {
|
||||
e.stopPropagation();
|
||||
if (id && !disabled) selection$.next({ id, label });
|
||||
|
@ -31,11 +31,20 @@
|
||||
on:click={() => branch.id && branchController.unapplyBranch(branch.id)}
|
||||
/>
|
||||
|
||||
<ContextMenuItem label="Delete" on:click={() => deleteBranchModal.show(branch)} />
|
||||
<ContextMenuItem
|
||||
label="Delete"
|
||||
on:click={() => {
|
||||
deleteBranchModal.show(branch);
|
||||
visible = false;
|
||||
}}
|
||||
/>
|
||||
|
||||
<ContextMenuItem
|
||||
label="Generate branch name"
|
||||
on:click={() => dispatch('action', 'generate-branch-name')}
|
||||
on:click={() => {
|
||||
dispatch('action', 'generate-branch-name');
|
||||
visible = false;
|
||||
}}
|
||||
disabled={!$aiGenEnabled}
|
||||
/>
|
||||
</ContextMenuSection>
|
||||
@ -43,12 +52,18 @@
|
||||
<ContextMenuSection>
|
||||
<ContextMenuItem
|
||||
label="Create branch before"
|
||||
on:click={() => branchController.createBranch({ order: branch.order })}
|
||||
on:click={() => {
|
||||
branchController.createBranch({ order: branch.order });
|
||||
visible = false;
|
||||
}}
|
||||
/>
|
||||
|
||||
<ContextMenuItem
|
||||
label="Create branch after"
|
||||
on:click={() => branchController.createBranch({ order: branch.order + 1 })}
|
||||
on:click={() => {
|
||||
branchController.createBranch({ order: branch.order + 1 });
|
||||
visible = false;
|
||||
}}
|
||||
/>
|
||||
</ContextMenuSection>
|
||||
</ContextMenu>
|
||||
@ -63,6 +78,7 @@
|
||||
color="error"
|
||||
on:click={async () => {
|
||||
await branchController.deleteBranch(branch.id);
|
||||
visible = false;
|
||||
}}
|
||||
>
|
||||
Delete
|
||||
|
Loading…
Reference in New Issue
Block a user