@sowell/quasar-app-extension-auth 1.8.1 → 1.8.3
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/package.json +1 -1
- package/src/assets/Sowell-plus-logo.svg +31 -0
- package/src/components/pages/AdminAuth.vue +41 -2
- package/src/components/pages/Auth.vue +41 -2
- package/src/components/pages/WebAuth.vue +41 -2
- package/src/components/pages/WebFirstLogin.vue +864 -0
- package/src/components/pages/WebSetPassword.vue +580 -0
- package/src/composables/useMagicLink.ts +15 -2
- package/src/composables/useValidateMagicLink.ts +14 -5
- package/src/i18n/fr-FR/index.ts +1 -1
- package/src/injects/prompts.ts +1 -0
- package/src/prompts.js +8 -0
- package/src/routes/index.ts +15 -2
package/src/routes/index.ts
CHANGED
|
@@ -52,6 +52,19 @@ const isInRoles = (X_REQUESTED_ROLES: string): string => {
|
|
|
52
52
|
: "ResetPassword.vue"
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
// Magiclink has two distinct UIs: the desktop one (ported from manager.sowell.app)
|
|
56
|
+
// for the web consoles, the mobile one for mobile-clean / mobile-incivility /
|
|
57
|
+
// reporter. Same rule as the login and reset-password pages above.
|
|
58
|
+
const isWebRole = (X_REQUESTED_ROLES: string): boolean =>
|
|
59
|
+
webAuthRoles.includes(X_REQUESTED_ROLES) ||
|
|
60
|
+
AdminAuthRoles.includes(X_REQUESTED_ROLES)
|
|
61
|
+
|
|
62
|
+
const firstLoginPage = (X_REQUESTED_ROLES: string): string =>
|
|
63
|
+
isWebRole(X_REQUESTED_ROLES) ? "WebFirstLogin.vue" : "FirstLogin.vue"
|
|
64
|
+
|
|
65
|
+
const setPasswordPage = (X_REQUESTED_ROLES: string): string =>
|
|
66
|
+
isWebRole(X_REQUESTED_ROLES) ? "WebSetPassword.vue" : "SetPassword.vue"
|
|
67
|
+
|
|
55
68
|
const routes: RouteRecordRaw[] = [
|
|
56
69
|
{
|
|
57
70
|
path: LOCAL_LOGIN_ROUTE,
|
|
@@ -86,7 +99,7 @@ if (isMagicLinkEnabled) {
|
|
|
86
99
|
component: () =>
|
|
87
100
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
88
101
|
// @ts-ignore
|
|
89
|
-
import(
|
|
102
|
+
import(`@sowell/auth/pages/${firstLoginPage(X_REQUESTED_ROLES)}`),
|
|
90
103
|
},
|
|
91
104
|
{
|
|
92
105
|
path: LOCAL_SET_PASSWORD_ROUTE || "/set-password",
|
|
@@ -94,7 +107,7 @@ if (isMagicLinkEnabled) {
|
|
|
94
107
|
component: () =>
|
|
95
108
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
96
109
|
// @ts-ignore
|
|
97
|
-
import(
|
|
110
|
+
import(`@sowell/auth/pages/${setPasswordPage(X_REQUESTED_ROLES)}`),
|
|
98
111
|
}
|
|
99
112
|
)
|
|
100
113
|
}
|