Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@ import { PasskeyProgress } from '../../../types/passkey';
import { ButtonComponent } from '../../button/button.component';
import { CreatePasskeyComponent } from '../create-passkey/create-passkey.component';
import { UsePasskeyComponent } from '../use-passkey/use-passkey.component';
import { BackdropComponent } from '../../backdrop/backdrop.component';

@Component({
selector: 'app-passkey',
templateUrl: './passkey.component.html',
imports: [ButtonComponent, CreatePasskeyComponent, UsePasskeyComponent],
imports: [
ButtonComponent,
CreatePasskeyComponent,
UsePasskeyComponent,
BackdropComponent,
],
})
export class PasskeyComponent implements OnInit {
readonly #passkeySupported = signal(true);
Expand Down
4 changes: 3 additions & 1 deletion templates/nextjs-example/src/components/logout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { signOut } from "@junobuild/core";

export const Logout = () => {
const doSignOut = (): Promise<void> => signOut();

return (
<button
type="button"
onClick={signOut}
onClick={doSignOut}
className="hover:text-lavender-blue-500 active:text-lavender-blue-400 mt-24 flex items-center gap-2 dark:text-white"
>
<svg
Expand Down
4 changes: 3 additions & 1 deletion templates/react-ts-example/src/components/Logout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import { signOut } from "@junobuild/core";
import { FC } from "react";

export const Logout: FC = () => {
const doSignOut = (): Promise<void> => signOut();

return (
<button
type="button"
onClick={signOut}
onClick={doSignOut}
className="hover:text-lavender-blue-500 active:text-lavender-blue-400 mt-24 flex items-center gap-2 dark:text-white"
>
<svg
Expand Down
5 changes: 5 additions & 0 deletions templates/sveltekit-example/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,10 @@ export default ts.config(
},
{
ignores: ['build/', '.svelte-kit/', 'dist/', 'static/']
},
{
rules: {
'svelte/no-navigation-without-resolve': 'off'
}
}
);
11 changes: 0 additions & 11 deletions templates/sveltekit-example/src/app.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,6 @@ declare global {
// interface PageData {}
// interface Platform {}
}

/* eslint-disable */

declare namespace svelteHTML {
interface HTMLAttributes<T> {
onjunoSignOutAuthTimer?: (event: CustomEvent<any>) => void;
onjunoExampleReload?: (event: CustomEvent<any>) => void;
}
}

/* eslint-enable */
}

export {};
12 changes: 12 additions & 0 deletions templates/sveltekit-example/src/custom-events.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
declare module 'svelte/elements' {
/* eslint-disable */

export interface HTMLAttributes<T> {
onjunoSignOutAuthTimer?: (event: CustomEvent<any>) => void;
onjunoExampleReload?: (event: CustomEvent<any>) => void;
}

/* eslint-enable */
}

export {};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

const signInWithII = async () => {
await signIn({
internet_identity: {},
internet_identity: {}
});
};
</script>
Expand Down
4 changes: 3 additions & 1 deletion templates/sveltekit-example/src/lib/components/Logout.svelte
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<script lang="ts">
import { signOut } from '@junobuild/core';

const doSignOut = (): Promise<void> => signOut();
</script>

<button
type="button"
onclick={signOut}
onclick={doSignOut}
class="hover:text-lavender-blue-500 active:text-lavender-blue-400 mt-24 flex items-center gap-2 dark:text-white"
>
<svg
Expand Down
4 changes: 3 additions & 1 deletion templates/vue-example/src/components/Logout.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<script setup lang="ts">
import { signOut } from '@junobuild/core'

const doSignOut = (): Promise<void> => signOut()
</script>

<template>
<button
type="button"
@click="signOut"
@click="doSignOut"
class="hover:text-lavender-blue-500 active:text-lavender-blue-400 mt-24 flex items-center gap-2 dark:text-white"
>
<svg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
signUp,
WebAuthnSignUpProgressStep,
} from '@junobuild/core'
import type { PasskeyProgress, PasskeyProps } from '@/types/passkey.ts'
import type { PasskeyProps } from '@/types/passkey.ts'
import { computed, ref } from 'vue'
import Button from '@/components/Button.vue'
import Progress from '@/components/passkey/Progress.vue'
Expand Down
Loading