|
2 | 2 | import '$lib/styles/global.css';
|
3 | 3 | import { page } from '$app/state';
|
4 | 4 | import { ButlerAIClient, BUTLER_AI_CLIENT } from '$lib/ai/service';
|
| 5 | + import RedirectIfNotFinalized from '$lib/auth/RedirectIfNotFinalized.svelte'; |
5 | 6 | import { AUTH_SERVICE } from '$lib/auth/authService.svelte';
|
6 | 7 | import Footer from '$lib/components/Footer.svelte';
|
7 | 8 | import Navigation from '$lib/components/Navigation.svelte';
|
|
20 | 21 | } from '@gitbutler/shared/chat/chatChannelsService';
|
21 | 22 | import { inject, provide } from '@gitbutler/shared/context';
|
22 | 23 | import { FeedService, FEED_SERVICE } from '@gitbutler/shared/feeds/service';
|
| 24 | + import LoginService, { LOGIN_SERVICE } from '@gitbutler/shared/login/loginService'; |
23 | 25 | import { HttpClient, HTTP_CLIENT } from '@gitbutler/shared/network/httpClient';
|
24 | 26 | import {
|
25 | 27 | OrganizationService,
|
|
71 | 73 | const httpClient = new HttpClient(window.fetch, env.PUBLIC_APP_HOST, authService.tokenReadable);
|
72 | 74 | provide(HTTP_CLIENT, httpClient);
|
73 | 75 |
|
| 76 | + const loginService = new LoginService(httpClient); |
| 77 | + provide(LOGIN_SERVICE, loginService); |
| 78 | +
|
74 | 79 | const aiService = new ButlerAIClient(httpClient);
|
75 | 80 | provide(BUTLER_AI_CLIENT, aiService);
|
76 | 81 |
|
|
142 | 147 | provide(RULES_SERVICE, rulesService);
|
143 | 148 |
|
144 | 149 | const isCommitPage = $derived(page.url.pathname.includes('/commit/'));
|
| 150 | + const isLoginPage = $derived(page.url.pathname.includes('/login')); |
| 151 | + const isSignupPage = $derived(page.url.pathname.includes('/signup')); |
| 152 | + const hasNavigation = $derived(!isCommitPage && !isLoginPage && !isSignupPage); |
145 | 153 | </script>
|
146 | 154 |
|
| 155 | +<RedirectIfNotFinalized /> |
| 156 | + |
147 | 157 | <div class="app">
|
148 |
| - {#if !isCommitPage} |
| 158 | + {#if hasNavigation} |
149 | 159 | <Navigation />
|
150 | 160 | {/if}
|
151 | 161 |
|
|
0 commit comments