mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-03 03:33:16 +03:00
Rename "your branches" to "stashed branches"
This commit is contained in:
parent
4c8c0d9bb2
commit
ad4544674b
@ -5,7 +5,7 @@
|
|||||||
import type { User } from '$lib/backend/cloud';
|
import type { User } from '$lib/backend/cloud';
|
||||||
import BaseBranchCard from './BaseBranchCard.svelte';
|
import BaseBranchCard from './BaseBranchCard.svelte';
|
||||||
import type { Project, ProjectService } from '$lib/backend/projects';
|
import type { Project, ProjectService } from '$lib/backend/projects';
|
||||||
import YourBranches from './YourBranches.svelte';
|
import StashedBranches from './StashedBranches.svelte';
|
||||||
import Footer from './Footer.svelte';
|
import Footer from './Footer.svelte';
|
||||||
import AppUpdater from './AppUpdater.svelte';
|
import AppUpdater from './AppUpdater.svelte';
|
||||||
import type { Loadable } from '@square/svelte-store';
|
import type { Loadable } from '@square/svelte-store';
|
||||||
@ -53,7 +53,7 @@
|
|||||||
<DomainButton href={`/${project.id}/board`} icon="branch">Applied branches</DomainButton>
|
<DomainButton href={`/${project.id}/board`} icon="branch">Applied branches</DomainButton>
|
||||||
</div>
|
</div>
|
||||||
<Branches projectId={project.id} {branchService} grow={!stashExpanded} />
|
<Branches projectId={project.id} {branchService} grow={!stashExpanded} />
|
||||||
<YourBranches {project} {branchController} {vbranchService} bind:expanded={stashExpanded} />
|
<StashedBranches {project} {branchController} {vbranchService} bind:expanded={stashExpanded} />
|
||||||
<Footer {user} projectId={project.id} />
|
<Footer {user} projectId={project.id} />
|
||||||
<AppUpdater {update} />
|
<AppUpdater {update} />
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,15 +1,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { IconTriangleDown } from '$lib/icons';
|
|
||||||
import { accordion } from './accordion';
|
import { accordion } from './accordion';
|
||||||
import Scrollbar from '$lib/components/Scrollbar.svelte';
|
import Scrollbar from '$lib/components/Scrollbar.svelte';
|
||||||
import TimeAgo from '$lib/components/TimeAgo.svelte';
|
|
||||||
import IconButton from '$lib/components/IconButton.svelte';
|
|
||||||
import IconChevronRightSmall from '$lib/icons/IconChevronRightSmall.svelte';
|
|
||||||
import { page } from '$app/stores';
|
|
||||||
import { slide } from 'svelte/transition';
|
import { slide } from 'svelte/transition';
|
||||||
import { computedAddedRemoved } from '$lib/vbranches/fileStatus';
|
|
||||||
import type { Branch } from '$lib/vbranches/types';
|
|
||||||
import Tooltip from '$lib/components/Tooltip.svelte';
|
|
||||||
import Modal from '$lib/components/Modal.svelte';
|
import Modal from '$lib/components/Modal.svelte';
|
||||||
import Button from '$lib/components/Button.svelte';
|
import Button from '$lib/components/Button.svelte';
|
||||||
import type { BranchController } from '$lib/vbranches/branchController';
|
import type { BranchController } from '$lib/vbranches/branchController';
|
||||||
@ -36,28 +28,10 @@
|
|||||||
const onScroll: UIEventHandler<HTMLDivElement> = (e) => {
|
const onScroll: UIEventHandler<HTMLDivElement> = (e) => {
|
||||||
scrolled = e.currentTarget.scrollTop != 0;
|
scrolled = e.currentTarget.scrollTop != 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
function sumBranchLinesAddedRemoved(branch: Branch) {
|
|
||||||
const comitted = computedAddedRemoved(...branch.commits.flatMap((c) => c.files));
|
|
||||||
const uncomitted = computedAddedRemoved(...branch.files);
|
|
||||||
|
|
||||||
return {
|
|
||||||
added: comitted.added + uncomitted.added,
|
|
||||||
removed: comitted.removed + uncomitted.removed
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggleBranch(branch: Branch) {
|
|
||||||
if (!branch.baseCurrent) {
|
|
||||||
applyConflictedModal.show(branch);
|
|
||||||
} else {
|
|
||||||
branchController.applyBranch(branch.id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<SectionHeader {scrolled} count={$branches$?.length ?? 0} expandable={true} bind:expanded>
|
<SectionHeader {scrolled} count={$branches$?.length ?? 0} expandable={true} bind:expanded>
|
||||||
Other branches
|
Stashed branches
|
||||||
</SectionHeader>
|
</SectionHeader>
|
||||||
<div use:accordion={expanded} class="container relative flex-grow">
|
<div use:accordion={expanded} class="container relative flex-grow">
|
||||||
<div
|
<div
|
Loading…
Reference in New Issue
Block a user