@bagelink/auth 1.12.3 → 1.12.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/index.cjs +2 -1183
  2. package/dist/index.d.ts +0 -9
  3. package/dist/index.mjs +3 -1184
  4. package/dist/routes.d.ts +0 -36
  5. package/package.json +1 -1
  6. package/src/index.ts +0 -13
  7. package/src/routes.ts +0 -96
  8. package/dist/Callback-BHqVaZZm.cjs +0 -4
  9. package/dist/Callback-C-XghN_z.js +0 -4
  10. package/dist/ForgotPasswordPage-BV9tyhHl.cjs +0 -4
  11. package/dist/ForgotPasswordPage-DvttMGb0.js +0 -4
  12. package/dist/LoginPage-hv1wc54S.cjs +0 -4
  13. package/dist/LoginPage-klj1NV4J.js +0 -4
  14. package/dist/ResetPasswordPage-COPrJmW8.cjs +0 -4
  15. package/dist/ResetPasswordPage-nvQ4uupb.js +0 -4
  16. package/dist/SignupPage-m36w9PLJ.cjs +0 -4
  17. package/dist/SignupPage-oUFYApYW.js +0 -4
  18. package/dist/components/auth/ForgotPasswordForm.vue.d.ts +0 -23
  19. package/dist/components/auth/LoginForm.vue.d.ts +0 -58
  20. package/dist/components/auth/ResetPasswordForm.vue.d.ts +0 -28
  21. package/dist/components/auth/SignupForm.vue.d.ts +0 -34
  22. package/dist/components/index.d.ts +0 -4
  23. package/dist/pages/Callback.vue.d.ts +0 -2
  24. package/dist/pages/ForgotPasswordPage.vue.d.ts +0 -13
  25. package/dist/pages/LoginPage.vue.d.ts +0 -38
  26. package/dist/pages/ResetPasswordPage.vue.d.ts +0 -13
  27. package/dist/pages/SignupPage.vue.d.ts +0 -16
  28. package/src/components/auth/ForgotPasswordForm.vue +0 -97
  29. package/src/components/auth/LoginForm.vue +0 -258
  30. package/src/components/auth/ResetPasswordForm.vue +0 -156
  31. package/src/components/auth/SignupForm.vue +0 -231
  32. package/src/components/index.ts +0 -5
  33. package/src/pages/Callback.vue +0 -196
  34. package/src/pages/ForgotPasswordPage.vue +0 -42
  35. package/src/pages/LoginPage.vue +0 -68
  36. package/src/pages/ResetPasswordPage.vue +0 -47
  37. package/src/pages/SignupPage.vue +0 -46
package/dist/routes.d.ts CHANGED
@@ -1,39 +1,3 @@
1
- import { RouteRecordRaw } from 'vue-router';
2
- export interface AuthRouteConfig {
3
- /** Base path for auth routes. Defaults to '/' */
4
- basePath?: string;
5
- /** Route names prefix. Defaults to '' */
6
- namePrefix?: string;
7
- /** Custom route names */
8
- routeNames?: {
9
- login?: string;
10
- signup?: string;
11
- forgotPassword?: string;
12
- resetPassword?: string;
13
- callback?: string;
14
- };
15
- /** Redirect path after successful auth. Defaults to '/' */
16
- redirectTo?: string;
17
- /** Custom layout wrapper component */
18
- layout?: any;
19
- }
20
- /**
21
- * Creates auth routes for Vue Router
22
- *
23
- * @example
24
- * ```ts
25
- * import { createAuthRoutes } from '@bagelink/auth'
26
- *
27
- * const routes = [
28
- * ...createAuthRoutes({
29
- * basePath: '/auth',
30
- * redirectTo: '/dashboard'
31
- * }),
32
- * // ... other routes
33
- * ]
34
- * ```
35
- */
36
- export declare function createAuthRoutes(config?: AuthRouteConfig): RouteRecordRaw[];
37
1
  /**
38
2
  * Creates a navigation guard to redirect authenticated users away from auth pages
39
3
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/auth",
3
3
  "type": "module",
4
- "version": "1.12.3",
4
+ "version": "1.12.5",
5
5
  "description": "Bagelink auth package",
6
6
  "author": {
7
7
  "name": "Bagel Studio",
package/src/index.ts CHANGED
@@ -1,19 +1,6 @@
1
1
  // Core auth functionality
2
2
  export * from './api'
3
- // Components
4
- export { default as ForgotPasswordForm } from './components/auth/ForgotPasswordForm.vue'
5
- export { default as LoginForm } from './components/auth/LoginForm.vue'
6
- export { default as ResetPasswordForm } from './components/auth/ResetPasswordForm.vue'
7
-
8
- export { default as SignupForm } from './components/auth/SignupForm.vue'
9
3
  export * from './constants'
10
- // Page components
11
- export { default as Callback } from './pages/Callback.vue'
12
- export { default as ForgotPasswordPage } from './pages/ForgotPasswordPage.vue'
13
-
14
- export { default as LoginPage } from './pages/LoginPage.vue'
15
- export { default as ResetPasswordPage } from './pages/ResetPasswordPage.vue'
16
- export { default as SignupPage } from './pages/SignupPage.vue'
17
4
 
18
5
  // Redirect utilities
19
6
  export * from './redirect'
package/src/routes.ts CHANGED
@@ -1,99 +1,3 @@
1
- import type { RouteRecordRaw } from 'vue-router'
2
-
3
- export interface AuthRouteConfig {
4
- /** Base path for auth routes. Defaults to '/' */
5
- basePath?: string
6
- /** Route names prefix. Defaults to '' */
7
- namePrefix?: string
8
- /** Custom route names */
9
- routeNames?: {
10
- login?: string
11
- signup?: string
12
- forgotPassword?: string
13
- resetPassword?: string
14
- callback?: string
15
- }
16
- /** Redirect path after successful auth. Defaults to '/' */
17
- redirectTo?: string
18
- /** Custom layout wrapper component */
19
- layout?: any
20
- }
21
-
22
- /**
23
- * Creates auth routes for Vue Router
24
- *
25
- * @example
26
- * ```ts
27
- * import { createAuthRoutes } from '@bagelink/auth'
28
- *
29
- * const routes = [
30
- * ...createAuthRoutes({
31
- * basePath: '/auth',
32
- * redirectTo: '/dashboard'
33
- * }),
34
- * // ... other routes
35
- * ]
36
- * ```
37
- */
38
- export function createAuthRoutes(config: AuthRouteConfig = {}): RouteRecordRaw[] {
39
- const {
40
- basePath = '',
41
- namePrefix = '',
42
- routeNames = {},
43
- layout
44
- } = config
45
-
46
- const createRouteName = (name: string) => namePrefix ? `${namePrefix}${name}` : name
47
-
48
- // Lazy load components
49
- const routes: RouteRecordRaw[] = [
50
- {
51
- path: `${basePath}/login`,
52
- name: routeNames.login || createRouteName('Login'),
53
- component: () => import('./pages/LoginPage.vue'),
54
- meta: { requiresAuth: false }
55
- },
56
- {
57
- path: `${basePath}/signup`,
58
- name: routeNames.signup || createRouteName('Signup'),
59
- component: () => import('./pages/SignupPage.vue'),
60
- meta: { requiresAuth: false }
61
- },
62
- {
63
- path: `${basePath}/forgot-password`,
64
- name: routeNames.forgotPassword || createRouteName('ForgotPassword'),
65
- component: () => import('./pages/ForgotPasswordPage.vue'),
66
- meta: { requiresAuth: false }
67
- },
68
- {
69
- path: `${basePath}/reset-password`,
70
- name: routeNames.resetPassword || createRouteName('ResetPassword'),
71
- component: () => import('./pages/ResetPasswordPage.vue'),
72
- meta: { requiresAuth: false }
73
- },
74
- {
75
- path: `${basePath}/callback`,
76
- name: routeNames.callback || createRouteName('AuthCallback'),
77
- component: () => import('./pages/Callback.vue'),
78
- meta: { requiresAuth: false }
79
- }
80
- ]
81
-
82
- // Wrap in layout if provided
83
- if (layout) {
84
- return [{
85
- path: basePath,
86
- component: layout,
87
- children: routes.map(route => ({
88
- ...route,
89
- path: route.path.replace(basePath, '')
90
- }))
91
- }]
92
- }
93
-
94
- return routes
95
- }
96
-
97
1
  /**
98
2
  * Creates a navigation guard to redirect authenticated users away from auth pages
99
3
  *
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index.cjs");
4
- exports.default = index.Callback;
@@ -1,4 +0,0 @@
1
- import { Callback as _sfc_main } from "./index.mjs";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index.cjs");
4
- exports.default = index.ForgotPasswordPage;
@@ -1,4 +0,0 @@
1
- import { ForgotPasswordPage as _sfc_main } from "./index.mjs";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index.cjs");
4
- exports.default = index.LoginPage;
@@ -1,4 +0,0 @@
1
- import { LoginPage as _sfc_main } from "./index.mjs";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index.cjs");
4
- exports.default = index.ResetPasswordPage;
@@ -1,4 +0,0 @@
1
- import { ResetPasswordPage as _sfc_main } from "./index.mjs";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index.cjs");
4
- exports.default = index.SignupPage;
@@ -1,4 +0,0 @@
1
- import { SignupPage as _sfc_main } from "./index.mjs";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,23 +0,0 @@
1
- export interface ForgotPasswordTexts {
2
- title?: string;
3
- emailLabel?: string;
4
- submitButton?: string;
5
- backToLogin?: string;
6
- emailSentTitle?: string;
7
- emailSentMessage?: string;
8
- }
9
- interface Props {
10
- emailSent?: boolean;
11
- useHebrewDefaults?: boolean;
12
- texts?: Partial<ForgotPasswordTexts>;
13
- }
14
- declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
15
- switchForm: (form: string) => any;
16
- }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
17
- onSwitchForm?: ((form: string) => any) | undefined;
18
- }>, {
19
- emailSent: boolean;
20
- useHebrewDefaults: boolean;
21
- texts: Partial<ForgotPasswordTexts>;
22
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
23
- export default _default;
@@ -1,58 +0,0 @@
1
- export interface LoginTexts {
2
- title?: string;
3
- emailLabel?: string;
4
- passwordLabel?: string;
5
- forgotPassword?: string;
6
- loginButton?: string;
7
- signupButton?: string;
8
- orText?: string;
9
- githubButton?: string;
10
- googleButton?: string;
11
- microsoftButton?: string;
12
- appleButton?: string;
13
- oktaButton?: string;
14
- facebookButton?: string;
15
- }
16
- interface Props {
17
- hideRegularLogin?: boolean;
18
- showForgotPassword?: boolean;
19
- showSignupButton?: boolean;
20
- github?: boolean;
21
- google?: boolean;
22
- microsoft?: boolean;
23
- apple?: boolean;
24
- okta?: boolean;
25
- facebook?: boolean;
26
- ssoOutline?: boolean;
27
- ssoShowValue?: boolean;
28
- ssoSize?: 'xs' | 's' | 'm' | 'l' | 'xl' | 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';
29
- ssoAlign?: boolean;
30
- ssoBrandBackground?: boolean;
31
- useHebrewDefaults?: boolean;
32
- errorState?: 'normal' | 'email-required' | 'email-invalid' | 'password-required' | 'invalid-credentials' | 'server-error';
33
- texts?: Partial<LoginTexts>;
34
- }
35
- declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
36
- switchForm: (form: string) => any;
37
- }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
38
- onSwitchForm?: ((form: string) => any) | undefined;
39
- }>, {
40
- google: boolean;
41
- microsoft: boolean;
42
- github: boolean;
43
- okta: boolean;
44
- apple: boolean;
45
- facebook: boolean;
46
- useHebrewDefaults: boolean;
47
- texts: Partial<LoginTexts>;
48
- hideRegularLogin: boolean;
49
- showForgotPassword: boolean;
50
- showSignupButton: boolean;
51
- ssoOutline: boolean;
52
- ssoShowValue: boolean;
53
- ssoSize: "xs" | "s" | "m" | "l" | "xl" | "extra-small" | "small" | "medium" | "large" | "extra-large";
54
- ssoAlign: boolean;
55
- ssoBrandBackground: boolean;
56
- errorState: "normal" | "email-required" | "email-invalid" | "password-required" | "invalid-credentials" | "server-error";
57
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLFormElement>;
58
- export default _default;
@@ -1,28 +0,0 @@
1
- export interface ResetPasswordTexts {
2
- title?: string;
3
- invalidLinkTitle?: string;
4
- invalidLinkMessage?: string;
5
- newPasswordLabel?: string;
6
- confirmPasswordLabel?: string;
7
- submitButton?: string;
8
- backToLogin?: string;
9
- passwordMismatchError?: string;
10
- invalidTokenError?: string;
11
- successTitle?: string;
12
- successMessage?: string;
13
- goToLogin?: string;
14
- }
15
- interface Props {
16
- token?: string;
17
- showSuccess?: boolean;
18
- useHebrewDefaults?: boolean;
19
- texts?: Partial<ResetPasswordTexts>;
20
- }
21
- declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
22
- switchForm: (form: string) => any;
23
- }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
24
- onSwitchForm?: ((form: string) => any) | undefined;
25
- }>, {
26
- useHebrewDefaults: boolean;
27
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
28
- export default _default;
@@ -1,34 +0,0 @@
1
- export interface SignupTexts {
2
- title?: string;
3
- firstNameLabel?: string;
4
- lastNameLabel?: string;
5
- emailLabel?: string;
6
- passwordLabel?: string;
7
- confirmPasswordLabel?: string;
8
- signupButton?: string;
9
- alreadyHaveAccount?: string;
10
- emailRequiredError?: string;
11
- emailInvalidError?: string;
12
- passwordRequiredError?: string;
13
- passwordTooShortError?: string;
14
- passwordMismatchError?: string;
15
- firstNameRequiredError?: string;
16
- lastNameRequiredError?: string;
17
- }
18
- interface Props {
19
- showNames?: boolean;
20
- useHebrewDefaults?: boolean;
21
- errorState?: 'normal' | 'email-required' | 'email-invalid' | 'password-short' | 'password-mismatch' | 'name-required' | 'server-error';
22
- texts?: Partial<SignupTexts>;
23
- }
24
- declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
25
- switchForm: (form: string) => any;
26
- }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
27
- onSwitchForm?: ((form: string) => any) | undefined;
28
- }>, {
29
- useHebrewDefaults: boolean;
30
- texts: Partial<SignupTexts>;
31
- errorState: "normal" | "email-required" | "email-invalid" | "password-short" | "password-mismatch" | "name-required" | "server-error";
32
- showNames: boolean;
33
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLFormElement>;
34
- export default _default;
@@ -1,4 +0,0 @@
1
- export { default as ForgotPasswordForm } from './auth/ForgotPasswordForm.vue';
2
- export { default as LoginForm } from './auth/LoginForm.vue';
3
- export { default as ResetPasswordForm } from './auth/ResetPasswordForm.vue';
4
- export { default as SignupForm } from './auth/SignupForm.vue';
@@ -1,2 +0,0 @@
1
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
2
- export default _default;
@@ -1,13 +0,0 @@
1
- import { ForgotPasswordTexts } from '../components/auth/ForgotPasswordForm.vue';
2
- interface Props {
3
- /** Custom texts for the forgot password form */
4
- texts?: Partial<ForgotPasswordTexts>;
5
- /** Card styling */
6
- cardWidth?: string;
7
- cardShadow?: boolean;
8
- }
9
- declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
10
- cardWidth: string;
11
- cardShadow: boolean;
12
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
13
- export default _default;
@@ -1,38 +0,0 @@
1
- import { LoginTexts } from '../components/auth/LoginForm.vue';
2
- interface Props {
3
- /** Custom texts for the login form */
4
- texts?: Partial<LoginTexts>;
5
- /** Show/hide specific SSO providers */
6
- github?: boolean;
7
- google?: boolean;
8
- microsoft?: boolean;
9
- apple?: boolean;
10
- okta?: boolean;
11
- facebook?: boolean;
12
- /** SSO button styling */
13
- ssoOutline?: boolean;
14
- ssoShowValue?: boolean;
15
- ssoBrandBackground?: boolean;
16
- /** Show/hide form elements */
17
- showForgotPassword?: boolean;
18
- showSignupButton?: boolean;
19
- /** Card styling */
20
- cardWidth?: string;
21
- cardShadow?: boolean;
22
- }
23
- declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
24
- google: boolean;
25
- microsoft: boolean;
26
- github: boolean;
27
- okta: boolean;
28
- apple: boolean;
29
- facebook: boolean;
30
- showForgotPassword: boolean;
31
- showSignupButton: boolean;
32
- ssoOutline: boolean;
33
- ssoShowValue: boolean;
34
- ssoBrandBackground: boolean;
35
- cardWidth: string;
36
- cardShadow: boolean;
37
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
38
- export default _default;
@@ -1,13 +0,0 @@
1
- import { ResetPasswordTexts } from '../components/auth/ResetPasswordForm.vue';
2
- interface Props {
3
- /** Custom texts for the reset password form */
4
- texts?: Partial<ResetPasswordTexts>;
5
- /** Card styling */
6
- cardWidth?: string;
7
- cardShadow?: boolean;
8
- }
9
- declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
10
- cardWidth: string;
11
- cardShadow: boolean;
12
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
13
- export default _default;
@@ -1,16 +0,0 @@
1
- import { SignupTexts } from '../components/auth/SignupForm.vue';
2
- interface Props {
3
- /** Custom texts for the signup form */
4
- texts?: Partial<SignupTexts>;
5
- /** Show name fields (first name, last name) */
6
- showNames?: boolean;
7
- /** Card styling */
8
- cardWidth?: string;
9
- cardShadow?: boolean;
10
- }
11
- declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
12
- showNames: boolean;
13
- cardWidth: string;
14
- cardShadow: boolean;
15
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
16
- export default _default;
@@ -1,97 +0,0 @@
1
- <script lang="ts" setup>
2
- import { useAuth } from '@bagelink/auth'
3
- import { Btn, Icon, TextInput } from '@bagelink/vue'
4
- import { computed, ref } from 'vue'
5
-
6
- export interface ForgotPasswordTexts {
7
- title?: string
8
- emailLabel?: string
9
- submitButton?: string
10
- backToLogin?: string
11
- emailSentTitle?: string
12
- emailSentMessage?: string
13
- }
14
-
15
- interface Props {
16
- emailSent?: boolean
17
- useHebrewDefaults?: boolean
18
- texts?: Partial<ForgotPasswordTexts>
19
- }
20
-
21
- const props = withDefaults(defineProps<Props>(), {
22
- emailSent: false,
23
- useHebrewDefaults: false,
24
- texts: () => ({})
25
- })
26
-
27
- defineEmits<{
28
- switchForm: [form: string]
29
- }>()
30
-
31
- const { forgotPassword } = useAuth()
32
-
33
- const email = ref<string>('')
34
- const internalEmailSent = ref(false)
35
-
36
- const showEmailSent = computed(() => props.emailSent || internalEmailSent.value)
37
-
38
- // Text configuration with conditional defaults
39
- const texts = computed(() => {
40
- const hebrewDefaults = {
41
- title: 'שכחתם סיסמה',
42
- emailLabel: 'איימיל',
43
- submitButton: 'שליחת איימיל איפוס',
44
- backToLogin: 'חזרה להתחברות',
45
- emailSentTitle: 'איימיל נשלח!',
46
- emailSentMessage: 'יש לבדוק את תיבת הדואר שלכם לקישור איפוס הסיסמה'
47
- }
48
-
49
- const englishDefaults = {
50
- title: 'Forgot Password',
51
- emailLabel: 'Email',
52
- submitButton: 'Send Reset Email',
53
- backToLogin: 'Back to Login',
54
- emailSentTitle: 'Email Sent!',
55
- emailSentMessage: 'Check your inbox for a password reset link'
56
- }
57
-
58
- const defaults = props.useHebrewDefaults ? hebrewDefaults : englishDefaults
59
-
60
- return {
61
- title: props.texts?.title ?? defaults.title,
62
- emailLabel: props.texts?.emailLabel ?? defaults.emailLabel,
63
- submitButton: props.texts?.submitButton ?? defaults.submitButton,
64
- backToLogin: props.texts?.backToLogin ?? defaults.backToLogin,
65
- emailSentTitle: props.texts?.emailSentTitle ?? defaults.emailSentTitle,
66
- emailSentMessage: props.texts?.emailSentMessage ?? defaults.emailSentMessage
67
- }
68
- })
69
-
70
- const textDirection = computed(() => ({ 'auth-rtl': props.useHebrewDefaults }))
71
-
72
- async function handleRecoverPassword() {
73
- await forgotPassword(email.value)
74
- internalEmailSent.value = true
75
- }
76
- </script>
77
-
78
- <template>
79
- <div v-if="showEmailSent" class="txt-center" :class="[textDirection]">
80
- <Icon name="email" size="4" class="opacity-3 mb-1" />
81
- <h1 class="txt20 bold mb-1">
82
- {{ texts.emailSentTitle }}
83
- </h1>
84
- <p class="txt-center opacity-7">
85
- {{ texts.emailSentMessage }}
86
- </p>
87
- <Btn thin flat class="txt-12 mt-2 underline" :value="texts.backToLogin" @click="$emit('switchForm', 'login')" />
88
- </div>
89
- <form v-else :class="textDirection" @submit.prevent="handleRecoverPassword">
90
- <h1 class="txt20 bold txt-center mb-1">
91
- {{ texts.title }}
92
- </h1>
93
- <TextInput v-model="email" :label="texts.emailLabel" autocomplete="email" type="email" />
94
- <Btn type="submit" class="w-100 mt-05" :value="texts.submitButton" />
95
- <Btn thin flat class="txt-12 mt-075 underline block" :value="texts.backToLogin" @click="$emit('switchForm', 'login')" />
96
- </form>
97
- </template>