Skip to content

Commit a1be1c2

Browse files
authored
Merge pull request gitbutlerapp#8720 from gitbutlerapp/kv-branch-1
Pre-fill branch name
2 parents da348f2 + 0248b5c commit a1be1c2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

apps/desktop/src/components/v3/MultiStackCreateNew.svelte

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,13 @@
9191
}
9292
}
9393
94+
function showAndPrefillName() {
95+
createRefModal?.show();
96+
stackService.newBranchName(projectId).then((name) => {
97+
createRefName = name.data || '';
98+
});
99+
}
100+
94101
// TODO: it would be nice to remember the last selected option for the next time the modal is opened
95102
</script>
96103

@@ -99,7 +106,7 @@
99106
type="button"
100107
class="new-stack-btn"
101108
class:no-stacks={noStacks}
102-
onclick={() => createRefModal?.show()}
109+
onclick={() => showAndPrefillName()}
103110
bind:this={el}
104111
onkeydown={handleArrowNavigation}
105112
>

0 commit comments

Comments
 (0)