File tree Expand file tree Collapse file tree 4 files changed +32
-17
lines changed
lib/components/blocks/space Expand file tree Collapse file tree 4 files changed +32
-17
lines changed Original file line number Diff line number Diff line change 1717 import { goto , invalidateAll } from " $app/navigation"
1818 import { Skeleton } from " $lib/components/ui/skeleton"
1919 import { toast } from " svelte-sonner"
20+ import { env } from " $env/dynamic/public"
2021
2122 export let space: ISpaceDTO
2223 export let me: any
Original file line number Diff line number Diff line change 1919 import { LoaderCircleIcon } from " lucide-svelte"
2020 import ResetPassword from " $lib/components/blocks/auth/reset-password.svelte"
2121 import { page } from " $app/stores"
22+ import { env } from " $env/dynamic/public"
2223
2324 const schema = z .object ({
2425 email: z .string ().email (),
215216 </div >
216217 <Separator class =" my-6" />
217218 <div class =" space-y-2" >
218- <Button href =" /login/github" variant =" secondary" class =" w-full" >
219- <img class ="mr-2 h-4 w-4" src ={Github } alt =" github" />
220- Login with Github
221- </Button >
222- <Button href =" /login/google" variant =" secondary" class =" w-full" >
223- <img class ="mr-2 h-4 w-4" src ={Google } alt =" google" />
224- Login with Google
225- </Button >
219+ {#if env .UNDB_PUBLIC_OAUTH_GITHUB_ENABLED === " true" }
220+ <Button href =" /login/github" variant =" secondary" class =" w-full" >
221+ <img class ="mr-2 h-4 w-4" src ={Github } alt =" github" />
222+ Login with Github
223+ </Button >
224+ {/if }
225+ {#if env .UNDB_PUBLIC_OAUTH_GOOGLE_ENABLED === " true" }
226+ <Button href =" /login/google" variant =" secondary" class =" w-full" >
227+ <img class ="mr-2 h-4 w-4" src ={Google } alt =" google" />
228+ Login with Google
229+ </Button >
230+ {/if }
226231 </div >
227232 </Card .Content >
228233 </Card .Root >
Original file line number Diff line number Diff line change 1717 import { Separator } from " $lib/components/ui/separator"
1818 import PasswordInput from " $lib/components/ui/input/password-input.svelte"
1919 import { LoaderCircleIcon } from " lucide-svelte"
20+ import { env } from " $env/dynamic/public"
2021
2122 const schema = z .object ({
2223 email: z .string ().email (),
245246 <a href ={` /login?invitationId=${invitationId } ` } class =" underline" > Sign in </a >
246247 {:else if redirect }
247248 <a href ={` /login?redirect=${redirect } ` } class =" underline" > Sign in </a >
248- {:else } <a href =" /login" class =" underline" > Sign in </a >
249+ {:else }
250+ <a href =" /login" class =" underline" > Sign in </a >
249251 {/if }
250252 </div >
251253 {#if ! invitationId }
252254 <Separator class =" my-6" />
253255 <div class =" space-y-2" >
254- <Button href =" /login/github" variant =" secondary" class =" w-full" >
255- <img class ="mr-2 h-4 w-4" src ={Github } alt =" github" />
256- Login with Github
257- </Button >
258- <Button href =" /login/google" variant =" secondary" class =" w-full" >
259- <img class ="mr-2 h-4 w-4" src ={Google } alt =" google" />
260- Login with Google
261- </Button >
256+ {#if env .UNDB_PUBLIC_OAUTH_GITHUB_ENABLED === " true" }
257+ <Button href =" /login/github" variant =" secondary" class =" w-full" >
258+ <img class ="mr-2 h-4 w-4" src ={Github } alt =" github" />
259+ Login with Github
260+ </Button >
261+ {/if }
262+ {#if env .UNDB_PUBLIC_OAUTH_GOOGLE_ENABLED === " true" }
263+ <Button href =" /login/google" variant =" secondary" class =" w-full" >
264+ <img class ="mr-2 h-4 w-4" src ={Google } alt =" google" />
265+ Login with Google
266+ </Button >
267+ {/if }
262268 </div >
263269 {/if }
264270 </Card .Content >
Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ const config = {
1212 pages : "dist" ,
1313 fallback : "index.html" ,
1414 } ) ,
15+ env : {
16+ publicPrefix : "UNDB_PUBLIC_" ,
17+ } ,
1518 alias : {
1619 $houdini : "./$houdini" ,
1720 } ,
You can’t perform that action at this time.
0 commit comments