mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-28 22:03:30 +03:00
Fix criteria for showing push button
This commit is contained in:
parent
62755f348e
commit
867323cfee
@ -21,7 +21,7 @@
|
||||
$: hasUnknownCommits = $unknownCommits.length > 0;
|
||||
</script>
|
||||
|
||||
{#if hasCommits}
|
||||
{#if hasCommits || hasUnknownCommits}
|
||||
<div class="commit-list__content">
|
||||
<div class="title text-base-13 text-semibold"></div>
|
||||
<div class="commits">
|
||||
|
@ -14,7 +14,7 @@
|
||||
import { persisted, type Persisted } from '$lib/persisted/persisted';
|
||||
import { getContext } from '$lib/utils/context';
|
||||
import * as toasts from '$lib/utils/toasts';
|
||||
import { getLocalCommits, getUnknownCommits, getUpstreamCommits } from '$lib/vbranches/contexts';
|
||||
import { getLocalCommits, getUnknownCommits } from '$lib/vbranches/contexts';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import type { Branch } from '$lib/vbranches/types';
|
||||
|
||||
@ -24,7 +24,6 @@
|
||||
|
||||
const project = getContext(Project);
|
||||
const localCommits = getLocalCommits();
|
||||
const upstreamCommits = getUpstreamCommits();
|
||||
const unknownCommits = getUnknownCommits();
|
||||
|
||||
function defaultAction(): Persisted<BranchAction> {
|
||||
@ -39,7 +38,7 @@
|
||||
let dropDown: DropDownButton;
|
||||
let disabled = false;
|
||||
let isPushed = $localCommits.length == 0 && !branch.requiresForce;
|
||||
$: canBeRebased = $upstreamCommits.length != $unknownCommits.length;
|
||||
$: canBeRebased = $unknownCommits.length > 0;
|
||||
$: selection$ = contextMenu?.selection$;
|
||||
$: action = selectAction(isPushed, $preferredAction);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user