nuxt-users 1.37.3 → 1.39.0
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.
- package/README.md +5 -1
- package/dist/cli.mjs +10 -6
- package/dist/module.d.mts +1 -1
- package/dist/module.d.ts +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +16 -3
- package/dist/runtime/components/NUsersEmailConfirmation.d.vue.ts +5 -3
- package/dist/runtime/components/NUsersEmailConfirmation.vue +22 -15
- package/dist/runtime/components/NUsersEmailConfirmation.vue.d.ts +5 -3
- package/dist/runtime/components/NUsersGoogleLoginButton.d.vue.ts +4 -2
- package/dist/runtime/components/NUsersGoogleLoginButton.vue +5 -2
- package/dist/runtime/components/NUsersGoogleLoginButton.vue.d.ts +4 -2
- package/dist/runtime/components/NUsersList.vue +25 -11
- package/dist/runtime/components/NUsersLoginForm.d.vue.ts +13 -2
- package/dist/runtime/components/NUsersLoginForm.vue +35 -13
- package/dist/runtime/components/NUsersLoginForm.vue.d.ts +13 -2
- package/dist/runtime/components/NUsersLogoutLink.d.vue.ts +3 -4
- package/dist/runtime/components/NUsersLogoutLink.vue +8 -5
- package/dist/runtime/components/NUsersLogoutLink.vue.d.ts +3 -4
- package/dist/runtime/components/NUsersPasswordStrengthIndicator.d.vue.ts +6 -0
- package/dist/runtime/components/NUsersPasswordStrengthIndicator.vue +17 -9
- package/dist/runtime/components/NUsersPasswordStrengthIndicator.vue.d.ts +6 -0
- package/dist/runtime/components/NUsersProfileInfo.d.vue.ts +13 -1
- package/dist/runtime/components/NUsersProfileInfo.vue +23 -9
- package/dist/runtime/components/NUsersProfileInfo.vue.d.ts +13 -1
- package/dist/runtime/components/NUsersRegisterForm.d.vue.ts +26 -11
- package/dist/runtime/components/NUsersRegisterForm.vue +34 -16
- package/dist/runtime/components/NUsersRegisterForm.vue.d.ts +26 -11
- package/dist/runtime/components/NUsersResetPasswordForm.d.vue.ts +11 -2
- package/dist/runtime/components/NUsersResetPasswordForm.vue +25 -12
- package/dist/runtime/components/NUsersResetPasswordForm.vue.d.ts +11 -2
- package/dist/runtime/components/NUsersUserCard.d.vue.ts +2 -0
- package/dist/runtime/components/NUsersUserCard.vue +8 -4
- package/dist/runtime/components/NUsersUserCard.vue.d.ts +2 -0
- package/dist/runtime/components/NUsersUserForm.d.vue.ts +2 -2
- package/dist/runtime/components/NUsersUserForm.vue +5 -4
- package/dist/runtime/components/NUsersUserForm.vue.d.ts +2 -2
- package/dist/runtime/composables/useNuxtUsersLocale.d.ts +15 -0
- package/dist/runtime/composables/useNuxtUsersLocale.js +27 -0
- package/dist/runtime/composables/usePasswordValidation.d.ts +1 -1
- package/dist/runtime/composables/usePublicPaths.js +2 -1
- package/dist/runtime/locales/en.d.ts +2 -0
- package/dist/runtime/locales/en.js +130 -0
- package/dist/runtime/locales/hu.d.ts +3 -0
- package/dist/runtime/locales/hu.js +188 -0
- package/dist/runtime/locales/index.d.ts +5 -0
- package/dist/runtime/locales/index.js +8 -0
- package/dist/runtime/middleware/authorization.client.js +4 -1
- package/dist/runtime/plugin.auth-init.d.ts +9 -0
- package/dist/runtime/plugin.auth-init.js +16 -0
- package/dist/runtime/server/api/nuxt-users/confirm-email.get.js +3 -3
- package/dist/runtime/server/api/nuxt-users/password/forgot.post.js +2 -1
- package/dist/runtime/server/api/nuxt-users/password/reset.post.d.ts +1 -1
- package/dist/runtime/server/api/nuxt-users/password/reset.post.js +4 -2
- package/dist/runtime/server/api/nuxt-users/session/index.post.js +4 -2
- package/dist/runtime/server/middleware/authorization.server.js +6 -3
- package/dist/runtime/server/utils/google-oauth.js +2 -1
- package/dist/runtime/utils/deep-merge.d.ts +8 -0
- package/dist/runtime/utils/deep-merge.js +17 -0
- package/dist/runtime/utils/locale.d.ts +14 -0
- package/dist/runtime/utils/locale.js +38 -0
- package/dist/shared/{nuxt-users.BnOQs2LI.mjs → nuxt-users.DfZ7bc_P.mjs} +16 -8
- package/dist/shared/{nuxt-users.SXaMnaEL.d.ts → nuxt-users.FiQjvlZl.d.mts} +40 -2
- package/dist/shared/{nuxt-users.SXaMnaEL.d.mts → nuxt-users.FiQjvlZl.d.ts} +40 -2
- package/dist/utils.d.mts +4 -1
- package/dist/utils.d.ts +4 -1
- package/dist/utils.mjs +4 -1
- package/package.json +5 -3
- package/scripts/check-locale-consistency.ts +156 -0
- package/scripts/check-peer-dependencies.js +5 -5
- package/scripts/check-translations.ts +255 -0
- package/scripts/post-build.js +1 -1
- package/dist/runtime/plugin.client.d.ts +0 -2
- package/dist/runtime/plugin.client.js +0 -6
|
@@ -2,15 +2,24 @@ interface Props {
|
|
|
2
2
|
updatePasswordEndpoint?: string;
|
|
3
3
|
resetPasswordEndpoint?: string;
|
|
4
4
|
redirectTo?: string;
|
|
5
|
+
titleReset?: string;
|
|
6
|
+
titleChange?: string;
|
|
7
|
+
currentPasswordLabel?: string;
|
|
8
|
+
newPasswordLabel?: string;
|
|
9
|
+
confirmPasswordLabel?: string;
|
|
10
|
+
submitResetLabel?: string;
|
|
11
|
+
submitUpdateLabel?: string;
|
|
12
|
+
submittingResetLabel?: string;
|
|
13
|
+
submittingUpdateLabel?: string;
|
|
5
14
|
}
|
|
6
15
|
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
|
-
success: (user: UserWithoutPassword) => any;
|
|
8
16
|
error: (error: string) => any;
|
|
17
|
+
success: (user: UserWithoutPassword) => any;
|
|
9
18
|
"password-error": (error: string) => any;
|
|
10
19
|
"password-updated": () => any;
|
|
11
20
|
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
12
|
-
onSuccess?: ((user: UserWithoutPassword) => any) | undefined;
|
|
13
21
|
onError?: ((error: string) => any) | undefined;
|
|
22
|
+
onSuccess?: ((user: UserWithoutPassword) => any) | undefined;
|
|
14
23
|
"onPassword-error"?: ((error: string) => any) | undefined;
|
|
15
24
|
"onPassword-updated"?: (() => any) | undefined;
|
|
16
25
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -3,12 +3,23 @@ import { ref, watch, computed } from "vue";
|
|
|
3
3
|
import { usePasswordValidation } from "../composables/usePasswordValidation";
|
|
4
4
|
import { useRuntimeConfig, useRoute, useRouter } from "#imports";
|
|
5
5
|
import NUsersPasswordStrengthIndicator from "./NUsersPasswordStrengthIndicator.vue";
|
|
6
|
+
import { useNuxtUsersLocale } from "../composables/useNuxtUsersLocale";
|
|
7
|
+
const { t } = useNuxtUsersLocale();
|
|
6
8
|
const { public: { nuxtUsers } } = useRuntimeConfig();
|
|
7
9
|
const moduleOptions = nuxtUsers;
|
|
8
10
|
const props = defineProps({
|
|
9
11
|
updatePasswordEndpoint: { type: String, required: false },
|
|
10
12
|
resetPasswordEndpoint: { type: String, required: false },
|
|
11
|
-
redirectTo: { type: String, required: false }
|
|
13
|
+
redirectTo: { type: String, required: false },
|
|
14
|
+
titleReset: { type: String, required: false },
|
|
15
|
+
titleChange: { type: String, required: false },
|
|
16
|
+
currentPasswordLabel: { type: String, required: false },
|
|
17
|
+
newPasswordLabel: { type: String, required: false },
|
|
18
|
+
confirmPasswordLabel: { type: String, required: false },
|
|
19
|
+
submitResetLabel: { type: String, required: false },
|
|
20
|
+
submitUpdateLabel: { type: String, required: false },
|
|
21
|
+
submittingResetLabel: { type: String, required: false },
|
|
22
|
+
submittingUpdateLabel: { type: String, required: false }
|
|
12
23
|
});
|
|
13
24
|
const emit = defineEmits(["success", "error", "password-error", "password-updated"]);
|
|
14
25
|
const route = useRoute();
|
|
@@ -30,7 +41,8 @@ const passwordValidation = usePasswordValidation(moduleOptions);
|
|
|
30
41
|
watch(() => passwordForm.value.newPassword, (newPassword) => {
|
|
31
42
|
if (newPassword) {
|
|
32
43
|
passwordValidation.validate(newPassword);
|
|
33
|
-
}
|
|
44
|
+
}
|
|
45
|
+
if (!newPassword) {
|
|
34
46
|
passwordValidation.clearValidation();
|
|
35
47
|
}
|
|
36
48
|
});
|
|
@@ -101,7 +113,8 @@ const resetPassword = async () => {
|
|
|
101
113
|
const handleSubmit = () => {
|
|
102
114
|
if (isPasswordReset.value) {
|
|
103
115
|
resetPassword();
|
|
104
|
-
}
|
|
116
|
+
}
|
|
117
|
+
if (!isPasswordReset.value) {
|
|
105
118
|
updatePassword();
|
|
106
119
|
}
|
|
107
120
|
};
|
|
@@ -110,15 +123,15 @@ const handleSubmit = () => {
|
|
|
110
123
|
<template>
|
|
111
124
|
<div class="n-users-reset-password-container n-users-section">
|
|
112
125
|
<h2 class="n-users-section-header">
|
|
113
|
-
{{ isPasswordReset ?
|
|
126
|
+
{{ isPasswordReset ? props.titleReset || t("resetPassword.titleReset") : props.titleChange || t("resetPassword.titleChange") }}
|
|
114
127
|
</h2>
|
|
115
128
|
|
|
116
129
|
<div
|
|
117
130
|
v-if="isPasswordReset"
|
|
118
131
|
class="n-users-info-message"
|
|
119
132
|
>
|
|
120
|
-
<p>
|
|
121
|
-
<p><strong>
|
|
133
|
+
<p>{{ t("resetPassword.secureResetInfo") }}</p>
|
|
134
|
+
<p><strong>{{ t("common.email") }}:</strong> {{ resetEmail }}</p>
|
|
122
135
|
</div>
|
|
123
136
|
|
|
124
137
|
<form @submit.prevent="handleSubmit">
|
|
@@ -130,7 +143,7 @@ const handleSubmit = () => {
|
|
|
130
143
|
<label
|
|
131
144
|
for="currentPassword"
|
|
132
145
|
class="n-users-form-label"
|
|
133
|
-
>
|
|
146
|
+
>{{ props.currentPasswordLabel || t("resetPassword.currentPasswordLabel") }}</label>
|
|
134
147
|
<input
|
|
135
148
|
id="currentPassword"
|
|
136
149
|
v-model="passwordForm.currentPassword"
|
|
@@ -145,7 +158,7 @@ const handleSubmit = () => {
|
|
|
145
158
|
<label
|
|
146
159
|
for="newPassword"
|
|
147
160
|
class="n-users-form-label"
|
|
148
|
-
>{{
|
|
161
|
+
>{{ props.newPasswordLabel || t("resetPassword.newPasswordLabel") }}</label>
|
|
149
162
|
<input
|
|
150
163
|
id="newPassword"
|
|
151
164
|
v-model="passwordForm.newPassword"
|
|
@@ -175,7 +188,7 @@ const handleSubmit = () => {
|
|
|
175
188
|
<label
|
|
176
189
|
for="newPasswordConfirmation"
|
|
177
190
|
class="n-users-form-label"
|
|
178
|
-
>
|
|
191
|
+
>{{ props.confirmPasswordLabel || t("resetPassword.confirmPasswordLabel") }}</label>
|
|
179
192
|
<input
|
|
180
193
|
id="newPasswordConfirmation"
|
|
181
194
|
v-model="passwordForm.newPasswordConfirmation"
|
|
@@ -206,10 +219,10 @@ const handleSubmit = () => {
|
|
|
206
219
|
:disabled="isPasswordLoading"
|
|
207
220
|
>
|
|
208
221
|
<span v-if="isPasswordLoading">
|
|
209
|
-
{{ isPasswordReset ? "
|
|
222
|
+
{{ isPasswordReset ? props.submittingResetLabel || t("resetPassword.submittingReset") : props.submittingUpdateLabel || t("resetPassword.submittingUpdate") }}
|
|
210
223
|
</span>
|
|
211
|
-
<span v-
|
|
212
|
-
{{ isPasswordReset ?
|
|
224
|
+
<span v-if="!isPasswordLoading">
|
|
225
|
+
{{ isPasswordReset ? props.submitResetLabel || t("resetPassword.submitReset") : props.submitUpdateLabel || t("resetPassword.submitUpdate") }}
|
|
213
226
|
</span>
|
|
214
227
|
</button>
|
|
215
228
|
</form>
|
|
@@ -2,15 +2,24 @@ interface Props {
|
|
|
2
2
|
updatePasswordEndpoint?: string;
|
|
3
3
|
resetPasswordEndpoint?: string;
|
|
4
4
|
redirectTo?: string;
|
|
5
|
+
titleReset?: string;
|
|
6
|
+
titleChange?: string;
|
|
7
|
+
currentPasswordLabel?: string;
|
|
8
|
+
newPasswordLabel?: string;
|
|
9
|
+
confirmPasswordLabel?: string;
|
|
10
|
+
submitResetLabel?: string;
|
|
11
|
+
submitUpdateLabel?: string;
|
|
12
|
+
submittingResetLabel?: string;
|
|
13
|
+
submittingUpdateLabel?: string;
|
|
5
14
|
}
|
|
6
15
|
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
|
-
success: (user: UserWithoutPassword) => any;
|
|
8
16
|
error: (error: string) => any;
|
|
17
|
+
success: (user: UserWithoutPassword) => any;
|
|
9
18
|
"password-error": (error: string) => any;
|
|
10
19
|
"password-updated": () => any;
|
|
11
20
|
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
12
|
-
onSuccess?: ((user: UserWithoutPassword) => any) | undefined;
|
|
13
21
|
onError?: ((error: string) => any) | undefined;
|
|
22
|
+
onSuccess?: ((user: UserWithoutPassword) => any) | undefined;
|
|
14
23
|
"onPassword-error"?: ((error: string) => any) | undefined;
|
|
15
24
|
"onPassword-updated"?: (() => any) | undefined;
|
|
16
25
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -3,11 +3,15 @@ import { computed, onMounted, ref } from "vue";
|
|
|
3
3
|
import { useAuthentication } from "../composables/useAuthentication";
|
|
4
4
|
import { useRuntimeConfig } from "#imports";
|
|
5
5
|
import { defaultDisplayFields, defaultFieldLabels } from "nuxt-users/utils";
|
|
6
|
+
import { useNuxtUsersLocale } from "../composables/useNuxtUsersLocale";
|
|
7
|
+
const { t } = useNuxtUsersLocale();
|
|
6
8
|
const props = defineProps({
|
|
7
9
|
user: { type: null, required: true },
|
|
8
10
|
index: { type: Number, required: true },
|
|
9
11
|
displayFields: { type: Array, required: false, default: () => defaultDisplayFields },
|
|
10
|
-
fieldLabels: { type: Object, required: false, default: () => defaultFieldLabels }
|
|
12
|
+
fieldLabels: { type: Object, required: false, default: () => defaultFieldLabels },
|
|
13
|
+
editButtonText: { type: String, required: false },
|
|
14
|
+
deleteButtonText: { type: String, required: false }
|
|
11
15
|
});
|
|
12
16
|
const emit = defineEmits(["delete", "editClick"]);
|
|
13
17
|
const { public: { nuxtUsers } } = useRuntimeConfig();
|
|
@@ -43,7 +47,7 @@ const editUser = async (user) => {
|
|
|
43
47
|
emit("editClick", user);
|
|
44
48
|
};
|
|
45
49
|
const deleteUser = async (user) => {
|
|
46
|
-
if (!confirm(
|
|
50
|
+
if (!confirm(t("userCard.deleteConfirm", [user.name]))) {
|
|
47
51
|
return;
|
|
48
52
|
}
|
|
49
53
|
try {
|
|
@@ -86,7 +90,7 @@ const deleteUser = async (user) => {
|
|
|
86
90
|
class="n-users-edit-btn"
|
|
87
91
|
@click="editUser(user)"
|
|
88
92
|
>
|
|
89
|
-
|
|
93
|
+
{{ props.editButtonText || t("userCard.editButton") }}
|
|
90
94
|
</button>
|
|
91
95
|
</slot>
|
|
92
96
|
<slot
|
|
@@ -100,7 +104,7 @@ const deleteUser = async (user) => {
|
|
|
100
104
|
class="n-users-delete-btn"
|
|
101
105
|
@click="deleteUser(user)"
|
|
102
106
|
>
|
|
103
|
-
|
|
107
|
+
{{ props.deleteButtonText || t("userCard.deleteButton") }}
|
|
104
108
|
</button>
|
|
105
109
|
</slot>
|
|
106
110
|
</div>
|
|
@@ -4,12 +4,12 @@ interface Props {
|
|
|
4
4
|
}
|
|
5
5
|
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
6
|
error: (error: unknown) => any;
|
|
7
|
-
cancel: () => any;
|
|
8
7
|
submit: (userData: User) => any;
|
|
8
|
+
cancel: () => any;
|
|
9
9
|
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
10
10
|
onError?: ((error: unknown) => any) | undefined;
|
|
11
|
-
onCancel?: (() => any) | undefined;
|
|
12
11
|
onSubmit?: ((userData: User) => any) | undefined;
|
|
12
|
+
onCancel?: (() => any) | undefined;
|
|
13
13
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
declare const _default: typeof __VLS_export;
|
|
15
15
|
export default _default;
|
|
@@ -26,16 +26,16 @@ watch(() => props.user, (newUser) => {
|
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
watch(() => formData.value.name, (name) => {
|
|
29
|
+
nameError.value = "";
|
|
29
30
|
if (!name || name.trim().length < 3) {
|
|
30
31
|
nameError.value = "Name must be at least 3 characters long";
|
|
31
|
-
} else {
|
|
32
|
-
nameError.value = "";
|
|
33
32
|
}
|
|
34
33
|
});
|
|
35
34
|
watch(() => formData.value.password, (newPassword) => {
|
|
36
35
|
if (newPassword) {
|
|
37
36
|
passwordValidation.validate(newPassword);
|
|
38
|
-
}
|
|
37
|
+
}
|
|
38
|
+
if (!newPassword) {
|
|
39
39
|
passwordValidation.clearValidation();
|
|
40
40
|
}
|
|
41
41
|
});
|
|
@@ -58,7 +58,8 @@ const handleSubmit = async () => {
|
|
|
58
58
|
method: "PATCH",
|
|
59
59
|
body: userData
|
|
60
60
|
});
|
|
61
|
-
}
|
|
61
|
+
}
|
|
62
|
+
if (!isEditMode.value) {
|
|
62
63
|
await $fetch(nuxtUsers.apiBasePath, {
|
|
63
64
|
method: "POST",
|
|
64
65
|
body: userData
|
|
@@ -4,12 +4,12 @@ interface Props {
|
|
|
4
4
|
}
|
|
5
5
|
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
6
|
error: (error: unknown) => any;
|
|
7
|
-
cancel: () => any;
|
|
8
7
|
submit: (userData: User) => any;
|
|
8
|
+
cancel: () => any;
|
|
9
9
|
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
10
10
|
onError?: ((error: unknown) => any) | undefined;
|
|
11
|
-
onCancel?: (() => any) | undefined;
|
|
12
11
|
onSubmit?: ((userData: User) => any) | undefined;
|
|
12
|
+
onCancel?: (() => any) | undefined;
|
|
13
13
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
declare const _default: typeof __VLS_export;
|
|
15
15
|
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composable for accessing nuxt-users localized messages
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* const { t } = useNuxtUsersLocale()
|
|
7
|
+
* const title = t('login.title') // 'Welcome Back'
|
|
8
|
+
* const message = t('userCard.deleteConfirm', ['John']) // 'Are you sure you want to delete user John?'
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export declare const useNuxtUsersLocale: () => {
|
|
12
|
+
t: (key: string, params?: (string | number)[]) => string;
|
|
13
|
+
currentLocale: import("vue").ComputedRef<string>;
|
|
14
|
+
fallbackLocale: import("vue").ComputedRef<string>;
|
|
15
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
import { useRuntimeConfig } from "#app";
|
|
3
|
+
import { getTranslation } from "../utils/locale.js";
|
|
4
|
+
export const useNuxtUsersLocale = () => {
|
|
5
|
+
const { public: { nuxtUsers } } = useRuntimeConfig();
|
|
6
|
+
const moduleOptions = nuxtUsers;
|
|
7
|
+
const currentLocale = computed(() => {
|
|
8
|
+
return moduleOptions.locale?.default || "en";
|
|
9
|
+
});
|
|
10
|
+
const fallbackLocale = computed(() => {
|
|
11
|
+
return moduleOptions.locale?.fallbackLocale || "en";
|
|
12
|
+
});
|
|
13
|
+
const t = (key, params) => {
|
|
14
|
+
return getTranslation(
|
|
15
|
+
key,
|
|
16
|
+
currentLocale.value,
|
|
17
|
+
moduleOptions.locale?.texts,
|
|
18
|
+
fallbackLocale.value,
|
|
19
|
+
params
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
return {
|
|
23
|
+
t,
|
|
24
|
+
currentLocale,
|
|
25
|
+
fallbackLocale
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -25,7 +25,7 @@ export declare const usePasswordValidation: (moduleOptions?: RuntimeModuleOption
|
|
|
25
25
|
isValid: import("vue").ComputedRef<boolean>;
|
|
26
26
|
errors: import("vue").ComputedRef<string[]>;
|
|
27
27
|
hints: import("vue").ComputedRef<string[]>;
|
|
28
|
-
strength: import("vue").ComputedRef<"
|
|
28
|
+
strength: import("vue").ComputedRef<"weak" | "medium" | "strong">;
|
|
29
29
|
score: import("vue").ComputedRef<number>;
|
|
30
30
|
strengthColor: import("vue").ComputedRef<string>;
|
|
31
31
|
strengthText: import("vue").ComputedRef<string>;
|
|
@@ -50,7 +50,8 @@ export const usePublicPaths = () => {
|
|
|
50
50
|
rolePermissions.forEach((permission) => {
|
|
51
51
|
if (typeof permission === "string") {
|
|
52
52
|
roleBasedPaths.push(permission);
|
|
53
|
-
}
|
|
53
|
+
}
|
|
54
|
+
if (typeof permission === "object" && permission.path) {
|
|
54
55
|
roleBasedPaths.push(permission.path);
|
|
55
56
|
}
|
|
56
57
|
});
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
export const en = {
|
|
2
|
+
common: {
|
|
3
|
+
email: "Email",
|
|
4
|
+
password: "Password",
|
|
5
|
+
name: "Name",
|
|
6
|
+
fullName: "Full Name",
|
|
7
|
+
role: "Role",
|
|
8
|
+
active: "Active",
|
|
9
|
+
yes: "Yes",
|
|
10
|
+
no: "No",
|
|
11
|
+
id: "ID",
|
|
12
|
+
created: "Created",
|
|
13
|
+
updated: "Updated",
|
|
14
|
+
lastLogin: "Last Login",
|
|
15
|
+
registered: "Registered",
|
|
16
|
+
lastUpdated: "Last updated",
|
|
17
|
+
edit: "Edit",
|
|
18
|
+
delete: "Delete",
|
|
19
|
+
loading: "Loading...",
|
|
20
|
+
error: "Error"
|
|
21
|
+
},
|
|
22
|
+
login: {
|
|
23
|
+
title: "Welcome Back",
|
|
24
|
+
subtitle: "Sign in to your account",
|
|
25
|
+
emailPlaceholder: "Enter your email",
|
|
26
|
+
passwordLabel: "Password",
|
|
27
|
+
passwordPlaceholder: "Enter your password",
|
|
28
|
+
rememberMe: "Remember me",
|
|
29
|
+
submit: "Sign In",
|
|
30
|
+
submitting: "Signing in...",
|
|
31
|
+
forgotPassword: "Forgot your password?",
|
|
32
|
+
forgotPasswordSending: "Sending...",
|
|
33
|
+
emailRequiredForForgotPassword: "Please enter your email address first",
|
|
34
|
+
loginFailed: "Login failed",
|
|
35
|
+
forgotPasswordFailed: "Failed to send password reset email"
|
|
36
|
+
},
|
|
37
|
+
register: {
|
|
38
|
+
title: "Create Account",
|
|
39
|
+
subtitle: "Sign up for a new account",
|
|
40
|
+
nameLabel: "Full Name",
|
|
41
|
+
namePlaceholder: "Enter your full name",
|
|
42
|
+
emailPlaceholder: "Enter your email",
|
|
43
|
+
passwordLabel: "Password",
|
|
44
|
+
passwordPlaceholder: "Enter your password",
|
|
45
|
+
confirmPasswordLabel: "Confirm Password",
|
|
46
|
+
confirmPasswordPlaceholder: "Confirm your password",
|
|
47
|
+
passwordMismatch: "Passwords do not match",
|
|
48
|
+
submit: "Create Account",
|
|
49
|
+
submitting: "Creating Account...",
|
|
50
|
+
alreadyHaveAccount: "Already have an account?",
|
|
51
|
+
signInLink: "Sign in here"
|
|
52
|
+
},
|
|
53
|
+
resetPassword: {
|
|
54
|
+
titleReset: "Reset Password",
|
|
55
|
+
titleChange: "Change Password",
|
|
56
|
+
currentPasswordLabel: "Current Password",
|
|
57
|
+
newPasswordLabel: "New Password",
|
|
58
|
+
confirmPasswordLabel: "Confirm New Password",
|
|
59
|
+
submitReset: "Reset Password",
|
|
60
|
+
submitUpdate: "Update Password",
|
|
61
|
+
submittingReset: "Resetting...",
|
|
62
|
+
submittingUpdate: "Updating...",
|
|
63
|
+
passwordHelpText: "Password must contain at least",
|
|
64
|
+
secureResetInfo: "You are resetting your password using a secure link."
|
|
65
|
+
},
|
|
66
|
+
passwordStrength: {
|
|
67
|
+
label: "Password Requirements",
|
|
68
|
+
strength: {
|
|
69
|
+
weak: "Weak",
|
|
70
|
+
medium: "Medium",
|
|
71
|
+
strong: "Strong",
|
|
72
|
+
veryStrong: "Very Strong",
|
|
73
|
+
unknown: "Unknown"
|
|
74
|
+
},
|
|
75
|
+
requirements: {
|
|
76
|
+
minLength: "At least {0} characters",
|
|
77
|
+
uppercase: "Contains uppercase letter",
|
|
78
|
+
lowercase: "Contains lowercase letter",
|
|
79
|
+
numbers: "Contains number",
|
|
80
|
+
specialChars: "Contains special character"
|
|
81
|
+
},
|
|
82
|
+
hintsTitle: "How to make your password stronger?"
|
|
83
|
+
},
|
|
84
|
+
profile: {
|
|
85
|
+
title: "Profile Information",
|
|
86
|
+
name: "Name",
|
|
87
|
+
email: "Email",
|
|
88
|
+
role: "Role",
|
|
89
|
+
registered: "Registered",
|
|
90
|
+
lastUpdated: "Last updated",
|
|
91
|
+
active: "Active",
|
|
92
|
+
id: "ID"
|
|
93
|
+
},
|
|
94
|
+
emailConfirmation: {
|
|
95
|
+
successTitle: "Email Confirmed!",
|
|
96
|
+
errorTitle: "Confirmation Failed",
|
|
97
|
+
loginButton: "Continue to Login",
|
|
98
|
+
backToLogin: "Back to Login",
|
|
99
|
+
processing: "Processing...",
|
|
100
|
+
processingMessage: "Please wait while we process your email confirmation.",
|
|
101
|
+
successMessage: "Your email has been confirmed and your account is now active.",
|
|
102
|
+
errorMessage: "The confirmation link is invalid or has expired. Please try registering again or contact support."
|
|
103
|
+
},
|
|
104
|
+
logout: {
|
|
105
|
+
linkText: "Logout",
|
|
106
|
+
loggingOut: "Logging out...",
|
|
107
|
+
confirmMessage: "Are you sure you want to logout?"
|
|
108
|
+
},
|
|
109
|
+
userCard: {
|
|
110
|
+
edit: "Edit",
|
|
111
|
+
delete: "Delete",
|
|
112
|
+
deleteConfirm: "Are you sure you want to delete user {0}?"
|
|
113
|
+
},
|
|
114
|
+
googleLogin: {
|
|
115
|
+
buttonText: "Continue with Google",
|
|
116
|
+
redirecting: "Redirecting..."
|
|
117
|
+
},
|
|
118
|
+
usersList: {
|
|
119
|
+
title: "Users List",
|
|
120
|
+
loading: "Loading users...",
|
|
121
|
+
noUsers: "No users found",
|
|
122
|
+
error: "Error",
|
|
123
|
+
page: "Page",
|
|
124
|
+
of: "of",
|
|
125
|
+
total: "Total",
|
|
126
|
+
users: "users",
|
|
127
|
+
previous: "Previous",
|
|
128
|
+
next: "Next"
|
|
129
|
+
}
|
|
130
|
+
};
|