Re-use project-level data when browsing source code
We make source code browsing faster by re-using project-level data when navigating between files. This comes at a cost: Project info (like the issue counter), remotes and branches are only updated when the page is hard-refreshed or the user navigates away from the source code view.
3 files changed
+51
-13
dcced2e0
→
69429cb0
modified src/lib/router.ts
@@ -1,7 +1,7 @@
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -101,9 +101,10 @@ async function navigate(
|
|
|
|
|
|
| + | |
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified src/lib/router/definitions.ts
@@ -62,7 +62,10 @@ export type LoadedRoute =
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -77,7 +80,7 @@ export async function loadRoute(route: Route): Promise<LoadedRoute> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified src/views/projects/router.ts
@@ -1,4 +1,8 @@
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -269,6 +273,7 @@ async function isLocalNodeSeeding(route: ProjectRoute): Promise<boolean> {
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -278,7 +283,7 @@ export async function loadProjectRoute(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -407,21 +412,50 @@ async function loadIssuesView(
|
|
|
|
|
|
| - | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -434,7 +468,7 @@ async function loadTreeView(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -450,7 +484,7 @@ async function loadTreeView(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|