mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 22:30:41 +08:00
Add link to code line numbers
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import type { Writable } from 'svelte/store';
|
||||
import type { Config } from "@app/config";
|
||||
import { formatLocationHash } from '@app/utils';
|
||||
import * as proj from '@app/project';
|
||||
|
||||
import Project from './Project.svelte';
|
||||
@@ -12,8 +13,10 @@
|
||||
export let content: proj.ProjectContent = proj.ProjectContent.Tree;
|
||||
export let project: proj.Project;
|
||||
export let config: Config;
|
||||
export let hash: string | null = null;
|
||||
|
||||
const browse: proj.BrowseTo = { content, peer, path: "/" };
|
||||
const line = formatLocationHash(hash);
|
||||
const browse: proj.BrowseTo = { content, peer, path: "/", line };
|
||||
const head = project.branches[project.defaultBranch];
|
||||
|
||||
// route is passed when the URL has more params after e.g. /tree or /history
|
||||
|
||||
Reference in New Issue
Block a user