Skip to content

Commit 8818481

Browse files
committed
feat: add swagger and graphql links to appbar for developers
1 parent a93900b commit 8818481

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

frontend/src/lib/layout/AppBar.svelte

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import type {LexAuthUser} from '$lib/user';
88
import {page} from '$app/state';
99
import AppLogo from '$lib/icons/AppLogo.svelte';
10+
import DevContent from './DevContent.svelte';
11+
import IconButton from '$lib/components/IconButton.svelte';
1012
1113
onMount(() => {
1214
isPlaywright = localStorage.getItem('isPlaywright') === 'true';
@@ -40,7 +42,23 @@
4042
</span>
4143
</div>
4244
</a>
43-
<div>
45+
<div class="flex gap-2">
46+
<DevContent>
47+
<IconButton
48+
icon="i-mdi-api"
49+
variant="btn-primary"
50+
class="glass"
51+
title="Swagger"
52+
onclick={() => window.open('/api/swagger', '_blank')}
53+
/>
54+
<IconButton
55+
icon="i-mdi-graphql"
56+
variant="btn-primary"
57+
class="glass"
58+
title="GraphQL"
59+
onclick={() => window.open('/api/graphql/ui', '_blank')}
60+
/>
61+
</DevContent>
4462
{#if user}
4563
<!-- using a label means it works before hydration is complete -->
4664
<label for="drawer-toggle" class="btn btn-primary glass px-2">

0 commit comments

Comments
 (0)