mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-29 14:25:45 +03:00
Update base branch conditionally in button click event
The button click event was modified to show a modal only if a certain condition is not met; otherwise, it will immediately update the base branch. The condition depends on the state of the `mergeUpstreamWarningDismissed` variable. Changes: - Replaced the direct function call `updateTargetModal.show` upon button click with a conditional function. - Now, on button click, if `mergeUpstreamWarningDismissed` is true, the base branch gets updated using `branchController.updateBaseBranch()`. - If `mergeUpstreamWarningDismissed` is false, the previous functionality remains, i.e., `updateTargetModal.show` gets called
This commit is contained in:
parent
ec2131baf4
commit
1e35aab885
@ -43,7 +43,13 @@
|
||||
width="full-width"
|
||||
height="small"
|
||||
color="purple"
|
||||
on:click={updateTargetModal.show}
|
||||
on:click={() => {
|
||||
if ($mergeUpstreamWarningDismissed) {
|
||||
branchController.updateBaseBranch();
|
||||
} else {
|
||||
updateTargetModal.show;
|
||||
}
|
||||
}}
|
||||
>
|
||||
Merge into common base
|
||||
</Button>
|
||||
|
Loading…
Reference in New Issue
Block a user