NotOnGitButlerBranch refactor

- fixed screen flickering
- page layout updated
This commit is contained in:
Pavel Laptev 2024-02-19 21:43:51 +01:00
parent 7227d7acf6
commit 9a5fe102a7

View File

@ -6,7 +6,6 @@
import RemoveProjectButton from './RemoveProjectButton.svelte'; import RemoveProjectButton from './RemoveProjectButton.svelte';
import Icon from '$lib/components/Icon.svelte'; import Icon from '$lib/components/Icon.svelte';
import * as toasts from '$lib/utils/toasts'; import * as toasts from '$lib/utils/toasts';
import { slide } from 'svelte/transition';
import type { Project, ProjectService } from '$lib/backend/projects'; import type { Project, ProjectService } from '$lib/backend/projects';
import type { UserService } from '$lib/stores/user'; import type { UserService } from '$lib/stores/user';
import type { BranchController } from '$lib/vbranches/branchController'; import type { BranchController } from '$lib/vbranches/branchController';
@ -21,8 +20,6 @@
$: user$ = userService.user$; $: user$ = userService.user$;
let showDropDown = false;
let isDeleting = false; let isDeleting = false;
let deleteConfirmationModal: RemoveProjectButton; let deleteConfirmationModal: RemoveProjectButton;
@ -76,18 +73,7 @@
> >
Go back to gitbutler/integration Go back to gitbutler/integration
</Button> </Button>
{#if !showDropDown}
<Button
color="primary"
kind="outlined"
on:click={() => {
showDropDown = true;
// if (baseBranch) branchController.setTarget(baseBranch.branchName);
}}
>
Switch to another project...
</Button>
{/if}
{#if project} {#if project}
<RemoveProjectButton <RemoveProjectButton
bind:this={deleteConfirmationModal} bind:this={deleteConfirmationModal}
@ -98,11 +84,9 @@
{/if} {/if}
</div> </div>
{#if showDropDown} <div class="switchrepo__project">
<div class="switchrepo__project" transition:slide={{ duration: 250 }}>
<ProjectSwitcher {projectService} {project} /> <ProjectSwitcher {projectService} {project} />
</div> </div>
{/if}
</div> </div>
</DecorativeSplitView> </DecorativeSplitView>