Skip to content

Commit 0ae70be

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

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

frontend/src/lib/layout/AppBar.svelte

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
import {resolve} from '$app/paths';
33
import {env} from '$env/dynamic/public';
44
import t from '$lib/i18n';
5-
import {AuthenticatedUserIcon, UserAddOutline} from '$lib/icons';
5+
import {AuthenticatedUserIcon, UserAddOutline, Icon} from '$lib/icons';
66
import {onMount} from 'svelte';
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';
1011
1112
onMount(() => {
1213
isPlaywright = localStorage.getItem('isPlaywright') === 'true';
@@ -40,7 +41,15 @@
4041
</span>
4142
</div>
4243
</a>
43-
<div>
44+
<div class="flex gap-2">
45+
<DevContent>
46+
<a href="/api/swagger" target="_blank" class="btn btn-ghost btn-square" title="Swagger UI">
47+
<Icon icon="i-mdi-api" size="text-2xl" />
48+
</a>
49+
<a href="/api/graphql/ui" target="_blank" class="btn btn-ghost btn-square" title="GraphQL UI">
50+
<Icon icon="i-mdi-graphql" size="text-2xl" />
51+
</a>
52+
</DevContent>
4453
{#if user}
4554
<!-- using a label means it works before hydration is complete -->
4655
<label for="drawer-toggle" class="btn btn-primary glass px-2">

0 commit comments

Comments
 (0)