mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2025-01-03 06:52:08 +03:00
Fix frontend lint errors
This commit is contained in:
parent
de9c969e40
commit
0754c44128
@ -1,5 +1,6 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
node_modules
|
node_modules
|
||||||
|
butler/target
|
||||||
/build
|
/build
|
||||||
/.svelte-kit
|
/.svelte-kit
|
||||||
/package
|
/package
|
||||||
@ -23,4 +24,4 @@ yarn.lock
|
|||||||
/histoire.setup.ts
|
/histoire.setup.ts
|
||||||
/histoire.config.ts
|
/histoire.config.ts
|
||||||
/postcss.config.cjs
|
/postcss.config.cjs
|
||||||
/tailwind.config.cjs
|
/tailwind.config.cjs
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
node_modules
|
node_modules
|
||||||
|
butler/target
|
||||||
/build
|
/build
|
||||||
/.svelte-kit
|
/.svelte-kit
|
||||||
/package
|
/package
|
||||||
|
@ -6,7 +6,6 @@ import {
|
|||||||
IconFeedback,
|
IconFeedback,
|
||||||
IconTerminal,
|
IconTerminal,
|
||||||
IconSettings,
|
IconSettings,
|
||||||
IconAdjustmentsHorizontal,
|
|
||||||
IconDiscord,
|
IconDiscord,
|
||||||
IconSearch,
|
IconSearch,
|
||||||
IconRewind,
|
IconRewind,
|
||||||
|
@ -120,7 +120,7 @@
|
|||||||
|
|
||||||
$: renderedRows = diffRows.rows.map((row) => ({ ...row, render: renderRowContent(row) }));
|
$: renderedRows = diffRows.rows.map((row) => ({ ...row, render: renderRowContent(row) }));
|
||||||
|
|
||||||
type RenderedRow = (typeof renderedRows)[0];
|
type RenderedRow = typeof renderedRows[0];
|
||||||
|
|
||||||
const padHighlighted = (rows: RenderedRow[]): RenderedRow[] => {
|
const padHighlighted = (rows: RenderedRow[]): RenderedRow[] => {
|
||||||
const chunks: (RenderedRow[] | RenderedRow)[] = [];
|
const chunks: (RenderedRow[] | RenderedRow)[] = [];
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { scale } from 'svelte/transition';
|
|
||||||
import OutClick from 'svelte-outclick';
|
import OutClick from 'svelte-outclick';
|
||||||
|
|
||||||
let dialog: HTMLDialogElement;
|
let dialog: HTMLDialogElement;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
let showMenu = false;
|
let showMenu = false;
|
||||||
let item: any;
|
let item: any;
|
||||||
|
|
||||||
function onDismiss(e: MouseEvent | KeyboardEvent | FocusEvent) {
|
function onDismiss() {
|
||||||
showMenu = false;
|
showMenu = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { onDestroy, onMount } from 'svelte';
|
import { onDestroy } from 'svelte';
|
||||||
|
|
||||||
export let viewport: Element;
|
export let viewport: Element;
|
||||||
export let contents: Element;
|
export let contents: Element;
|
||||||
@ -7,8 +7,8 @@
|
|||||||
export let alwaysVisible = false;
|
export let alwaysVisible = false;
|
||||||
export let initiallyVisible = false;
|
export let initiallyVisible = false;
|
||||||
export let margin: { top?: number; right?: number; bottom?: number; left?: number } = {};
|
export let margin: { top?: number; right?: number; bottom?: number; left?: number } = {};
|
||||||
export let opacity: string = '0.2';
|
export let opacity = '0.2';
|
||||||
export let width: string = '0.625rem';
|
export let width = '0.625rem';
|
||||||
|
|
||||||
let thumb: Element;
|
let thumb: Element;
|
||||||
let track: Element;
|
let track: Element;
|
||||||
@ -68,7 +68,7 @@
|
|||||||
track.addEventListener('mouseenter', onTrackEnter);
|
track.addEventListener('mouseenter', onTrackEnter);
|
||||||
track.addEventListener('mouseleave', onTrackLeave);
|
track.addEventListener('mouseleave', onTrackLeave);
|
||||||
return () => {
|
return () => {
|
||||||
track.removeEventListener('mousedown', onThumbClick);
|
track.removeEventListener('mousedown', onTrackClick);
|
||||||
track.removeEventListener('mouseenter', onTrackEnter);
|
track.removeEventListener('mouseenter', onTrackEnter);
|
||||||
track.removeEventListener('mouseleave', onTrackLeave);
|
track.removeEventListener('mouseleave', onTrackLeave);
|
||||||
};
|
};
|
||||||
|
@ -4,10 +4,8 @@
|
|||||||
import { open } from '@tauri-apps/api/dialog';
|
import { open } from '@tauri-apps/api/dialog';
|
||||||
import { toasts, Toaster, events, hotkeys, stores } from '$lib';
|
import { toasts, Toaster, events, hotkeys, stores } from '$lib';
|
||||||
import type { LayoutData } from './$types';
|
import type { LayoutData } from './$types';
|
||||||
import { Button, Link, Tooltip } from '$lib/components';
|
import { Link, Tooltip } from '$lib/components';
|
||||||
import { IconEmail } from '$lib/icons';
|
import { IconEmail } from '$lib/icons';
|
||||||
import type { Project } from '$lib/api';
|
|
||||||
import { PUBLIC_API_BASE_URL } from '$env/static/public';
|
|
||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
import { derived } from '@square/svelte-store';
|
import { derived } from '@square/svelte-store';
|
||||||
import { onMount, setContext } from 'svelte';
|
import { onMount, setContext } from 'svelte';
|
||||||
@ -16,7 +14,6 @@
|
|||||||
import LinkProjectModal from './LinkProjectModal.svelte';
|
import LinkProjectModal from './LinkProjectModal.svelte';
|
||||||
import Breadcrumbs from './Breadcrumbs.svelte';
|
import Breadcrumbs from './Breadcrumbs.svelte';
|
||||||
import ShareIssueModal from './ShareIssueModal.svelte';
|
import ShareIssueModal from './ShareIssueModal.svelte';
|
||||||
import ThemeSelector from './ThemeSelector.svelte';
|
|
||||||
import { SETTINGS_CONTEXT, loadUserSettings } from '$lib/userSettings';
|
import { SETTINGS_CONTEXT, loadUserSettings } from '$lib/userSettings';
|
||||||
import { initTheme } from '$lib/theme';
|
import { initTheme } from '$lib/theme';
|
||||||
|
|
||||||
@ -40,9 +37,6 @@
|
|||||||
$: document.documentElement.style.fontSize = zoom + 'rem';
|
$: document.documentElement.style.fontSize = zoom + 'rem';
|
||||||
$: userSettings.update((s) => ({ ...s, zoom: zoom }));
|
$: userSettings.update((s) => ({ ...s, zoom: zoom }));
|
||||||
|
|
||||||
const projectUrl = (project: Project) =>
|
|
||||||
new URL(`/projects/${project.id}`, new URL(PUBLIC_API_BASE_URL)).toString();
|
|
||||||
|
|
||||||
onMount(() =>
|
onMount(() =>
|
||||||
unsubscribe(
|
unsubscribe(
|
||||||
events.on('openNewProjectModal', () =>
|
events.on('openNewProjectModal', () =>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { LayoutData } from './$types';
|
import type { LayoutData } from './$types';
|
||||||
import { Button, Tooltip } from '$lib/components';
|
import { Button } from '$lib/components';
|
||||||
import { events } from '$lib';
|
import { events } from '$lib';
|
||||||
|
|
||||||
export let data: LayoutData;
|
export let data: LayoutData;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { Project } from '$lib/api';
|
import type { Project } from '$lib/api';
|
||||||
import { IconHome } from '$lib/icons';
|
import { IconHome } from '$lib/icons';
|
||||||
import { Button } from '$lib/components';
|
|
||||||
import { goto } from '$app/navigation';
|
import { goto } from '$app/navigation';
|
||||||
|
|
||||||
export let project: Project | undefined;
|
export let project: Project | undefined;
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { LayoutData } from './$types';
|
import type { LayoutData } from './$types';
|
||||||
import type { Project } from '$lib/api';
|
import { Button, Tooltip } from '$lib/components';
|
||||||
import { Button, Link, Tooltip } from '$lib/components';
|
|
||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
import { goto } from '$app/navigation';
|
import { goto } from '$app/navigation';
|
||||||
import { IconEmail, IconRewind, IconSearch, IconSettings, IconTerminal } from '$lib/icons';
|
import { IconRewind, IconSearch, IconSettings, IconTerminal } from '$lib/icons';
|
||||||
import { PUBLIC_API_BASE_URL } from '$env/static/public';
|
|
||||||
import { events } from '$lib';
|
|
||||||
|
|
||||||
export let data: LayoutData;
|
export let data: LayoutData;
|
||||||
const { project } = data;
|
const { project } = data;
|
||||||
@ -16,9 +13,6 @@
|
|||||||
const onSearchSubmit = () =>
|
const onSearchSubmit = () =>
|
||||||
goto(`/projects/${$project?.id}/search?q=${encodeURIComponent(query)}`);
|
goto(`/projects/${$project?.id}/search?q=${encodeURIComponent(query)}`);
|
||||||
|
|
||||||
const projectUrl = (project: Project) =>
|
|
||||||
new URL(`/projects/${project.id}`, new URL(PUBLIC_API_BASE_URL)).toString();
|
|
||||||
|
|
||||||
$: selection = $page?.route?.id?.split('/')?.[3];
|
$: selection = $page?.route?.id?.split('/')?.[3];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { slide } from 'svelte/transition';
|
import { slide } from 'svelte/transition';
|
||||||
import { IconTriangleUp, IconTriangleDown } from '$lib/icons';
|
import { IconTriangleUp, IconTriangleDown } from '$lib/icons';
|
||||||
import type { BaseBranch, Commit } from '$lib/vbranches';
|
import type { BaseBranch } from '$lib/vbranches';
|
||||||
import { formatDistanceToNow } from 'date-fns';
|
import { formatDistanceToNow } from 'date-fns';
|
||||||
import type { SettingsStore } from '$lib/userSettings';
|
import type { SettingsStore } from '$lib/userSettings';
|
||||||
|
|
||||||
|
@ -332,7 +332,9 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<div class="w-3 shrink-0 border-l border-r border-light-400 bg-light-300 dark:bg-dark-500 dark:border-dark-600" />
|
<div
|
||||||
|
class="w-3 shrink-0 border-l border-r border-light-400 bg-light-300 dark:border-dark-600 dark:bg-dark-500"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="relative flex flex-grow overflow-y-hidden">
|
<div class="relative flex flex-grow overflow-y-hidden">
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
import { slide } from 'svelte/transition';
|
import { slide } from 'svelte/transition';
|
||||||
import { SETTINGS_CONTEXT, type SettingsStore } from '$lib/userSettings';
|
import { SETTINGS_CONTEXT, type SettingsStore } from '$lib/userSettings';
|
||||||
import { summarizeHunk } from '$lib/summaries';
|
import { summarizeHunk } from '$lib/summaries';
|
||||||
import { Button } from '$lib/components';
|
|
||||||
|
|
||||||
export let file: File;
|
export let file: File;
|
||||||
export let conflicted: boolean;
|
export let conflicted: boolean;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Button, Checkbox, Modal } from '$lib/components';
|
import { Button, Checkbox, Modal } from '$lib/components';
|
||||||
import type { Branch, BranchData, Hunk } from '$lib/vbranches';
|
import type { Branch, BranchData } from '$lib/vbranches';
|
||||||
import { formatDistanceToNow } from 'date-fns';
|
import { formatDistanceToNow } from 'date-fns';
|
||||||
import { IconGitBranch, IconRemote } from '$lib/icons';
|
import { IconGitBranch, IconRemote } from '$lib/icons';
|
||||||
import { IconTriangleDown, IconTriangleUp } from '$lib/icons';
|
import { IconTriangleDown, IconTriangleUp } from '$lib/icons';
|
||||||
|
@ -14,14 +14,12 @@
|
|||||||
let viewport: Element;
|
let viewport: Element;
|
||||||
let contents: Element;
|
let contents: Element;
|
||||||
|
|
||||||
|
let fetching = false;
|
||||||
|
let buttonHovered = false;
|
||||||
|
|
||||||
const branchController = getContext<BranchController>(BRANCH_CONTROLLER_KEY);
|
const branchController = getContext<BranchController>(BRANCH_CONTROLLER_KEY);
|
||||||
|
|
||||||
// $: behind = baseBranch.behind > 0;
|
|
||||||
$: behindMessage = base.behind > 0 ? `behind ${base.behind}` : 'up-to-date';
|
|
||||||
|
|
||||||
let fetching = false;
|
|
||||||
$: expanded = base.behind > 0;
|
$: expanded = base.behind > 0;
|
||||||
let buttonHovered = false;
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
@ -71,7 +69,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{#if expanded}
|
{#if expanded}
|
||||||
<div
|
<div
|
||||||
class="h-full w-3 shrink-0 border-l border-r border-light-400 bg-light-300 dark:bg-dark-500 dark:border-dark-600"
|
class="h-full w-3 shrink-0 border-l border-r border-light-400 bg-light-300 dark:border-dark-600 dark:bg-dark-500"
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user