Skip to content

Commit 197ffaf

Browse files
committed
Move url param constants
1 parent 4747f1b commit 197ffaf

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

web/src/lib/diff-viewer-multi-file.svelte.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ import { Context, Debounced, watch } from "runed";
3737
import { MediaQuery } from "svelte/reactivity";
3838
import { ProgressBarState } from "$lib/components/progress-bar/index.svelte";
3939

40+
export const GITHUB_URL_PARAM = "github_url";
41+
export const PATCH_URL_PARAM = "patch_url";
42+
4043
export type SidebarLocation = "left" | "right";
4144

4245
export class GlobalOptions {

web/src/lib/github.svelte.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { PUBLIC_GITHUB_APP_NAME, PUBLIC_GITHUB_CLIENT_ID } from "$env/static/pub
77
export const GITHUB_USERNAME_KEY = "github_username";
88
export const GITHUB_TOKEN_KEY = "github_token";
99
export const GITHUB_TOKEN_EXPIRES_KEY = "github_token_expires";
10-
export const GITHUB_URL_PARAM = "github_url";
1110

1211
export const githubUsername: { value: string | null } = $state({ value: null });
1312

web/src/lib/open-diff-dialog.svelte.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import type { WritableBoxedValues } from "svelte-toolbelt";
22
import { DirectoryEntry, FileEntry, MultimodalFileInputState, type MultimodalFileInputValueMetadata } from "./components/files/index.svelte";
33
import { SvelteSet } from "svelte/reactivity";
4-
import { type FileStatus, GITHUB_URL_PARAM } from "$lib/github.svelte";
4+
import { type FileStatus } from "$lib/github.svelte";
55
import { page } from "$app/state";
66
import { goto } from "$app/navigation";
7-
import { makeImageDetails, makeTextDetails, MultiFileDiffViewerState } from "$lib/diff-viewer-multi-file.svelte";
7+
import { GITHUB_URL_PARAM, makeImageDetails, makeTextDetails, MultiFileDiffViewerState, PATCH_URL_PARAM } from "$lib/diff-viewer-multi-file.svelte";
88
import { binaryFileDummyDetails, bytesEqual, isBinaryFile, isImageFile, parseMultiFilePatch } from "$lib/util";
99
import { createTwoFilesPatch } from "diff";
1010

11-
export const PATCH_URL_PARAM = "patch_url";
12-
1311
export interface OpenDiffDialogProps {
1412
open?: boolean;
1513
}

web/src/routes/OpenDiffDialog.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
<script lang="ts">
2-
import { getGithubUsername, GITHUB_URL_PARAM, installGithubApp, loginWithGithub, logoutGithub } from "$lib/github.svelte";
2+
import { getGithubUsername, installGithubApp, loginWithGithub, logoutGithub } from "$lib/github.svelte";
33
import { Button, Dialog, Separator, Popover } from "bits-ui";
44
import InfoPopup from "$lib/components/InfoPopup.svelte";
55
import { page } from "$app/state";
66
import { onMount } from "svelte";
77
import DirectorySelect from "$lib/components/files/DirectorySelect.svelte";
88
import MultimodalFileInput from "$lib/components/files/MultimodalFileInput.svelte";
99
import { flip } from "svelte/animate";
10-
import { OpenDiffDialogState, PATCH_URL_PARAM, type OpenDiffDialogProps } from "$lib/open-diff-dialog.svelte";
10+
import { OpenDiffDialogState, type OpenDiffDialogProps } from "$lib/open-diff-dialog.svelte";
1111
import { box } from "svelte-toolbelt";
12+
import { GITHUB_URL_PARAM, PATCH_URL_PARAM } from "$lib/diff-viewer-multi-file.svelte";
1213
1314
let { open = $bindable(false) }: OpenDiffDialogProps = $props();
1415

0 commit comments

Comments
 (0)