mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-18 06:22:28 +03:00
fix: rm unnecessary svelte-french-toast imports
This commit is contained in:
parent
bd77da52a9
commit
71463b91c8
@ -14,7 +14,6 @@
|
||||
import { getContext, getContextStore } from '$lib/utils/context';
|
||||
import { BranchController } from '$lib/vbranches/branchController';
|
||||
import { BaseBranch, Branch } from '$lib/vbranches/types';
|
||||
import toast from 'svelte-french-toast';
|
||||
import type { PullRequest } from '$lib/github/types';
|
||||
import type { Persisted } from '$lib/persisted/persisted';
|
||||
import { goto } from '$app/navigation';
|
||||
@ -66,12 +65,12 @@
|
||||
async function createPr(createPrOpts: CreatePrOpts): Promise<PullRequest | undefined> {
|
||||
const opts = { ...defaultPrOpts, ...createPrOpts };
|
||||
if (!githubService.isEnabled) {
|
||||
toast.error('Cannot create PR without GitHub credentials');
|
||||
showError('Cannot create PR without GitHub credentials');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$baseBranch?.shortName) {
|
||||
toast.error('Cannot create PR without base branch');
|
||||
showError('Cannot create PR without base branch');
|
||||
return;
|
||||
}
|
||||
|
||||
@ -139,7 +138,8 @@
|
||||
<div
|
||||
class="header card"
|
||||
class:header_target-branch={branch.selectedForChanges}
|
||||
class:header_target-branch-animation={isTargetBranchAnimated && branch.selectedForChanges}
|
||||
class:header_target-branch-animation={isTargetBranchAnimated &&
|
||||
branch.selectedForChanges}
|
||||
>
|
||||
<div class="header__info-wrapper">
|
||||
{#if !isUnapplied}
|
||||
@ -255,7 +255,8 @@
|
||||
<div class="header__buttons">
|
||||
{#if !hasPullRequest}
|
||||
<PullRequestButton
|
||||
on:click={async (e) => await createPr({ draft: e.detail.action == 'draft' })}
|
||||
on:click={async (e) =>
|
||||
await createPr({ draft: e.detail.action == 'draft' })}
|
||||
loading={isLoading}
|
||||
/>
|
||||
{/if}
|
||||
|
@ -5,12 +5,12 @@
|
||||
import Button from '$lib/components/Button.svelte';
|
||||
import Icon from '$lib/components/Icon.svelte';
|
||||
import ViewPrContextMenu from '$lib/components/ViewPrContextMenu.svelte';
|
||||
import { showError } from '$lib/notifications/toasts';
|
||||
import { getContext } from '$lib/utils/context';
|
||||
import { tooltip } from '$lib/utils/tooltip';
|
||||
import { openExternalUrl } from '$lib/utils/url';
|
||||
import { BranchController } from '$lib/vbranches/branchController';
|
||||
import { onDestroy } from 'svelte';
|
||||
import toast from 'svelte-french-toast';
|
||||
import type { PullRequest } from '$lib/github/types';
|
||||
import type { BaseBranch, RemoteBranch } from '$lib/vbranches/types';
|
||||
import { goto } from '$app/navigation';
|
||||
@ -99,9 +99,8 @@
|
||||
await branchController.createvBranchFromBranch(branch.name);
|
||||
goto(`/${project.id}/board`);
|
||||
} catch (e) {
|
||||
const err = 'Failed to apply branch';
|
||||
toast.error(err);
|
||||
console.error(err, e);
|
||||
showError('Failed to apply branch', e);
|
||||
console.error(e);
|
||||
} finally {
|
||||
isApplying = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user