mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2025-01-04 15:53:30 +03:00
chore: remove unused imports and variables
This commit is contained in:
parent
c01c7626ce
commit
bfa84c9d46
@ -1,5 +1,3 @@
|
||||
import * as events from './events';
|
||||
|
||||
export async function on(combo: string, callback: (event: KeyboardEvent) => void) {
|
||||
const comboContainsControlKeys =
|
||||
combo.includes('Meta') || combo.includes('Alt') || combo.includes('Ctrl');
|
||||
|
@ -1,11 +1,7 @@
|
||||
<script lang="ts">
|
||||
import type { LayoutData } from './$types';
|
||||
import { getContext, onMount } from 'svelte';
|
||||
import {
|
||||
SETTINGS_CONTEXT,
|
||||
loadUserSettings,
|
||||
type SettingsStore
|
||||
} from '$lib/settings/userSettings';
|
||||
import { SETTINGS_CONTEXT, type SettingsStore } from '$lib/settings/userSettings';
|
||||
import { Code } from '$lib/backend/ipc';
|
||||
import Resizer from '$lib/components/Resizer.svelte';
|
||||
import IconButton from '$lib/components/IconButton.svelte';
|
||||
@ -19,7 +15,6 @@
|
||||
import Link from '$lib/components/Link.svelte';
|
||||
import Button from '$lib/components/Button.svelte';
|
||||
import { syncToCloud } from '$lib/backend/cloud';
|
||||
import BaseBranch from './base/BaseBranch.svelte';
|
||||
|
||||
export let data: LayoutData;
|
||||
|
||||
@ -60,7 +55,6 @@
|
||||
Loading...
|
||||
{:else if $baseBranchStore}
|
||||
{#if !$vbranchesState.isError}
|
||||
{@const project = $projectStore}
|
||||
<div class="relative flex w-full max-w-full" role="group" on:dragover|preventDefault>
|
||||
<div bind:this={trayViewport} class="z-30 flex flex-shrink">
|
||||
{#if $projectStore}
|
||||
|
@ -2,7 +2,6 @@
|
||||
import type { BaseBranch } from '$lib/vbranches/types';
|
||||
import CommitCard from '../components/CommitCard.svelte';
|
||||
import type { BranchController } from '$lib/vbranches/branchController';
|
||||
import Scrollbar from '$lib/components/Scrollbar.svelte';
|
||||
import { projectMergeUpstreamWarningDismissed } from '$lib/config/config';
|
||||
import Tooltip from '$lib/components/Tooltip.svelte';
|
||||
import Button from '$lib/components/Button.svelte';
|
||||
|
@ -3,7 +3,6 @@
|
||||
import type { PageData } from './$types';
|
||||
import IconExternalLink from '$lib/icons/IconExternalLink.svelte';
|
||||
import Board from './Board.svelte';
|
||||
import ProjectHeader from '../ProjectHeader.svelte';
|
||||
|
||||
export let data: PageData;
|
||||
let {
|
||||
|
@ -9,7 +9,6 @@
|
||||
import IconRefresh from '$lib/icons/IconRefresh.svelte';
|
||||
import type { BranchController } from '$lib/vbranches/branchController';
|
||||
import type { BaseBranch, CustomStore } from '$lib/vbranches/types';
|
||||
import type { Readable } from '@square/svelte-store';
|
||||
import ProjectsPopup from './ProjectsPopup.svelte';
|
||||
|
||||
export let project: Project;
|
||||
@ -43,13 +42,13 @@
|
||||
<IconButton
|
||||
class="items-center justify-center align-top "
|
||||
icon={IconDropDown}
|
||||
on:click={(e) => {
|
||||
on:click={() => {
|
||||
popup.show();
|
||||
}}
|
||||
/>
|
||||
<IconButton
|
||||
class="items-center justify-center align-top "
|
||||
on:click={(e) => {
|
||||
on:click={() => {
|
||||
fetching = true;
|
||||
branchController.fetchFromTarget().finally(() => (fetching = false));
|
||||
}}
|
||||
|
@ -78,7 +78,7 @@
|
||||
{#if !$pullRequestsStore}
|
||||
<span>loading...</span>
|
||||
{:else}
|
||||
{#each filterPRs($pullRequestsStore, $filterChoice) as pr, i}
|
||||
{#each filterPRs($pullRequestsStore, $filterChoice) as pr}
|
||||
<a
|
||||
href="/{projectId}/pull/{pr.number}"
|
||||
class="border-color-4 flex flex-col justify-between gap-1 border-b px-2 py-1 pt-2 -outline-offset-2 outline-blue-200 last:border-b-0 focus:outline-2"
|
||||
|
@ -82,7 +82,7 @@
|
||||
{:else if $branchesWithContentStore.filter((b) => !b.active).length == 0}
|
||||
<div class="text-color-2 p-2">You have no stashed branches</div>
|
||||
{:else}
|
||||
{#each $branchesWithContentStore.filter((b) => !b.active) as branch, i (branch.id)}
|
||||
{#each $branchesWithContentStore.filter((b) => !b.active) as branch}
|
||||
{@const { added, removed } = sumBranchLinesAddedRemoved(branch)}
|
||||
{@const latestModifiedAt = branch.files.at(0)?.hunks.at(0)?.modifiedAt}
|
||||
<a
|
||||
|
@ -8,7 +8,6 @@
|
||||
import * as projects from '$lib/backend/projects';
|
||||
import { updateProject } from '$lib/backend/projects';
|
||||
import type { PageData } from './$types';
|
||||
import BackButton from '$lib/components/BackButton.svelte';
|
||||
import Modal from '$lib/components/Modal.svelte';
|
||||
import Button from '$lib/components/Button.svelte';
|
||||
import Spacer from './Spacer.svelte';
|
||||
|
@ -3,7 +3,7 @@ import { getSessionStore } from '$lib/stores/sessions';
|
||||
import { getDiffsStore } from '$lib/backend/diffs';
|
||||
import { error } from '@sveltejs/kit';
|
||||
import type { LayoutLoad } from './$types';
|
||||
import { getProjectStore, type Project } from '$lib/backend/projects';
|
||||
import { getProjectStore } from '$lib/backend/projects';
|
||||
|
||||
export const prerender = false;
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { error, redirect } from '@sveltejs/kit';
|
||||
import { format, compareDesc } from 'date-fns';
|
||||
import type { PageLoad } from './$types';
|
||||
import { getSessionStore } from '$lib/stores/sessions';
|
||||
|
||||
export const load: PageLoad = async ({ url, params, parent }) => {
|
||||
const { sessions } = await parent();
|
||||
|
Loading…
Reference in New Issue
Block a user