mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-30 13:06:10 +03:00
Merge pull request #3144 from gitbutlerapp/removed-unused-UpstreamCommits-card
Remove unused code and Tag component CSS fix
This commit is contained in:
commit
7faefd849f
@ -184,6 +184,7 @@
|
|||||||
color="ghost"
|
color="ghost"
|
||||||
clickable
|
clickable
|
||||||
border
|
border
|
||||||
|
shrinkable
|
||||||
verticalOrientation={isLaneCollapsed}
|
verticalOrientation={isLaneCollapsed}
|
||||||
on:mousedown={(e) => {
|
on:mousedown={(e) => {
|
||||||
const url = $pr$?.htmlUrl;
|
const url = $pr$?.htmlUrl;
|
||||||
|
@ -76,6 +76,7 @@
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.label {
|
.label {
|
||||||
|
white-space: nowrap;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 0 var(--space-2);
|
padding: 0 var(--space-2);
|
||||||
}
|
}
|
||||||
|
@ -1,56 +0,0 @@
|
|||||||
<script lang="ts">
|
|
||||||
import CommitCard from './CommitCard.svelte';
|
|
||||||
import Button from '$lib/components/Button.svelte';
|
|
||||||
import { draggable } from '$lib/dragging/draggable';
|
|
||||||
import { draggableRemoteCommit } from '$lib/dragging/draggables';
|
|
||||||
import type { Project } from '$lib/backend/projects';
|
|
||||||
import type { BranchController } from '$lib/vbranches/branchController';
|
|
||||||
import type { BaseBranch, LocalFile, RemoteBranchData } from '$lib/vbranches/types';
|
|
||||||
import type { Writable } from 'svelte/store';
|
|
||||||
|
|
||||||
export let project: Project | undefined;
|
|
||||||
export let branchId: string;
|
|
||||||
export let projectId: string;
|
|
||||||
export let branchCount: number;
|
|
||||||
export let upstream: RemoteBranchData | undefined;
|
|
||||||
export let branchController: BranchController;
|
|
||||||
export let base: BaseBranch | undefined | null;
|
|
||||||
export let selectedFiles: Writable<LocalFile[]>;
|
|
||||||
|
|
||||||
function merge() {
|
|
||||||
branchController.mergeUpstream(branchId);
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{#if upstream}
|
|
||||||
<div class="card">
|
|
||||||
<div class="card__header text-semibold text-base-12">
|
|
||||||
Upstream {upstream.commits.length > 1 ? 'commits' : 'commit'}
|
|
||||||
</div>
|
|
||||||
<div class="card__content" id="upstreamCommits">
|
|
||||||
{#each upstream.commits as commit (commit.id)}
|
|
||||||
<div use:draggable={draggableRemoteCommit(branchId, commit)}>
|
|
||||||
<CommitCard
|
|
||||||
{commit}
|
|
||||||
{project}
|
|
||||||
{projectId}
|
|
||||||
commitUrl={base?.commitUrl(commit.id)}
|
|
||||||
{branchController}
|
|
||||||
{selectedFiles}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
{/each}
|
|
||||||
{#if branchCount > 1}
|
|
||||||
<div class="flex justify-end p-2">
|
|
||||||
<div class="px-2 text-sm">
|
|
||||||
You have {branchCount} active branches. To merge upstream work, we will unapply all other
|
|
||||||
branches.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<div class="card__footer">
|
|
||||||
<Button wide color="primary" on:click={merge}>Merge</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
Loading…
Reference in New Issue
Block a user