Merge pull request #82 from emailerfacu-spec/firebase-Oauth

Firebase oauth
This commit is contained in:
emailerfacu-spec
2026-01-22 23:53:18 -03:00
committed by GitHub
16 changed files with 584 additions and 52 deletions
+8 -5
View File
@@ -35,6 +35,7 @@
let showCrearPost = $state(false);
let data = $derived(page.data);
$inspect(data);
let fetching = false;
@@ -195,11 +196,13 @@
<UserPen />
</Button>
</DialogModificarUsuario>
<DialogResetPassword bind:data>
<Button variant="default" size="icon-lg">
<Key />
</Button>
</DialogResetPassword>
{#if !$sesionStore.isFirebase}
<DialogResetPassword bind:data>
<Button variant="default" size="icon-lg">
<Key />
</Button>
</DialogResetPassword>
{/if}
</div>
{/if}
-1
View File
@@ -10,7 +10,6 @@
import { updatePost } from '@/hooks/updatePost';
import Separator from '@/components/ui/separator/separator.svelte';
import { page } from '$app/state';
import { onMount } from 'svelte';
interface props {
data: {
+1
View File
@@ -1,4 +1,5 @@
import { obtenerCantidadDeUsosdeHtag } from '@/hooks/obtenerCantidadDeUsosdeHtag.js';
export const ssr = false;
export async function load({ params, fetch }) {
let { htag } = params;
+9
View File
@@ -4,6 +4,9 @@
import AlertCircleIcon from '@lucide/svelte/icons/alert-circle';
import { fade, fly } from 'svelte/transition';
import Info from '@lucide/svelte/icons/info';
import Card from '@/components/ui/card/card.svelte';
import CardContent from '@/components/ui/card/card-content.svelte';
import FireBaseButton from '@/components/FireBaseButton.svelte';
let { data } = $props();
@@ -41,6 +44,12 @@
</div>
{/if}
<LoginForm bind:showAlert id="1" />
<Card class="mt-2">
<CardContent>
<FireBaseButton mode="login" />
</CardContent>
</Card>
{#if showAlert}
<div class="mt-2" transition:fade>
<Alert.Root variant="destructive">
+2
View File
@@ -2,6 +2,8 @@ import { obtenerPostPorId } from '@/hooks/obtenerPostPorId.js';
import { obtenerRespuestasPorId } from '@/hooks/obtenerRespuestasPorId';
import { error } from '@sveltejs/kit';
export const ssr = false;
export async function load({ params, fetch, depends }) {
let ret = await obtenerPostPorId(params.idpost, fetch, depends);
if (ret == null) return error(404, 'no existe un post con ese id.');
+9
View File
@@ -3,6 +3,9 @@
import AlertCircleIcon from '@lucide/svelte/icons/alert-circle';
import * as Alert from '@/components/ui/alert';
import { fade } from 'svelte/transition';
import FireBaseButton from '@/components/FireBaseButton.svelte';
import Card from '@/components/ui/card/card.svelte';
import CardContent from '@/components/ui/card/card-content.svelte';
let showAlert: boolean = $state(false);
@@ -21,6 +24,12 @@
<div class="flex min-h-fit w-full items-center justify-center p-6 md:p-10">
<div class="w-full max-w-sm">
<SignupForm bind:showAlert />
<Card class="mt-2">
<CardContent>
<FireBaseButton mode="register" />
</CardContent>
</Card>
{#if showAlert}
<div class="mt-2" transition:fade>
<Alert.Root variant="destructive">