Skip to content

Commit 4f006ed

Browse files
committed
chore: update lock files and fix pre-commit
1 parent 15958a9 commit 4f006ed

9 files changed

Lines changed: 362 additions & 271 deletions

File tree

frontend/app/package-lock.json

Lines changed: 100 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/app/src/lib/components/sidebar/NavMain.svelte

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
import { page } from '$app/stores';
33
import { Home, Database, Play } from 'lucide-svelte';
44
import * as Sidebar from '$lib/components/ui/sidebar';
5+
import { features } from '$lib/stores/features.svelte.js';
56
6-
const navItems = [
7+
const allNavItems = [
78
{
89
title: 'Home',
910
url: '/',
@@ -21,6 +22,10 @@
2122
}
2223
];
2324
25+
const navItems = $derived(
26+
allNavItems.filter((item) => item.title !== 'Runs' || features.runsEnabled)
27+
);
28+
2429
// Reactive variable to check current path
2530
const currentPath = $derived($page.url.pathname);
2631
</script>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { version } from '$lib/api/client.js';
2+
3+
export const features = $state({ runsEnabled: false });
4+
5+
export async function initFeatures(): Promise<void> {
6+
const response = await version.get();
7+
features.runsEnabled = ((response.snakedispatch_backends as string[]) ?? []).length > 0;
8+
}

0 commit comments

Comments
 (0)