| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
| 23 | 23 | - fixed sources for allowedActions in hooks | |
| 24 | 24 | - menu now auto-closes on mobile after selecting item | |
| 25 | 25 | - backplate on mobile now is higher then table sticky header | |
| 26 | + - fix split js error when going to 404 page in logged out state | ||
| 26 | 27 | ||
| 27 | 28 | ### Improved | |
| 28 | 29 | ||
@@ -31,6 +32,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
| 31 | 32 | - added `adminforth.menu.refreshMenuBadges()` to refresh all badges in menu from the frontend component | |
| 32 | 33 | - created env HEAVY_DEBUG_QUERY to log SQL queries in the console | |
| 33 | 34 | - simplified logic on detecting whether to init user Dropdown or not | |
| 35 | + - add autocomplete suggestion for password inputs | ||
| 36 | + | ||
| 34 | 37 | ||
| 35 | 38 | ### Added | |
| 36 | 39 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | { | |
| 2 | 2 | "name": "adminforth", | |
| 3 | - "version": "1.4.3-next.38", | ||
| 3 | + "version": "1.4.3-next.39", | ||
| 4 | 4 | "description": "OpenSource Vue3 powered forth-generation admin panel", | |
| 5 | 5 | "main": "dist/index.js", | |
| 6 | 6 | "module": "dist/index.js", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -41,7 +41,8 @@ | |||
| 41 | 41 | <label for="password" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">New password</label> | |
| 42 | 42 | <input | |
| 43 | 43 | :type="unmasked ? 'text' : 'password'" | |
| 44 | - name="password" id="password" | ||
| 44 | + name="password" id="password" | ||
| 45 | + autocomplete="new-password" | ||
| 45 | 46 | v-model="password" | |
| 46 | 47 | @keydown.enter="passwordConfirmationInput.focus()" | |
| 47 | 48 | class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white" | |
@@ -63,6 +64,7 @@ | |||
| 63 | 64 | <input | |
| 64 | 65 | :type="unmasked ? 'text' : 'password'" | |
| 65 | 66 | name="password_confirmation" id="password_confirmation" | |
| 67 | + autocomplete="new-password" | ||
| 66 | 68 | v-model="passwordConfirmation" | |
| 67 | 69 | class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white" | |
| 68 | 70 | placeholder="Confirm new password" required | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -41,7 +41,8 @@ | |||
| 41 | 41 | <label for="email" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Your email</label> | |
| 42 | 42 | <input type="email" name="email" id="email" | |
| 43 | 43 | tabindex="1" | |
| 44 | - @keydown.enter="passwordInput.focus()" | ||
| 44 | + autocomplete="username" | ||
| 45 | + @keydown.enter="passwordInput?.focus()" | ||
| 45 | 46 | ref="emailInput" | |
| 46 | 47 | class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white" | |
| 47 | 48 | placeholder="name@company.com" | |
@@ -52,11 +53,12 @@ | |||
| 52 | 53 | <label for="password" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">New password</label> | |
| 53 | 54 | <input | |
| 54 | 55 | tabindex="2" | |
| 56 | + autocomplete="new-password" | ||
| 55 | 57 | ref="passwordInput" | |
| 56 | 58 | :type="unmasked ? 'text' : 'password'" | |
| 57 | 59 | name="password" id="password" | |
| 58 | 60 | v-model="password" | |
| 59 | - @keydown.enter="passwordConfirmationInput.focus()" | ||
| 61 | + @keydown.enter="passwordConfirmationInput?.focus()" | ||
| 60 | 62 | class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white" | |
| 61 | 63 | placeholder="New password" required | |
| 62 | 64 | /> | |
@@ -75,6 +77,7 @@ | |||
| 75 | 77 | <label for="password_confirmation" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Confirm new password</label> | |
| 76 | 78 | <input | |
| 77 | 79 | ref="passwordConfirmationInput" | |
| 80 | + autocomplete="new-password" | ||
| 78 | 81 | :type="unmasked ? 'text' : 'password'" | |
| 79 | 82 | name="password_confirmation" id="password_confirmation" | |
| 80 | 83 | tabindex="3" | |
@@ -142,9 +145,9 @@ const inProgress = ref(false); | |||
| 142 | 145 | const coreStore = useCoreStore(); | |
| 143 | 146 | const requestSent = ref(false); | |
| 144 | 147 | ||
| 145 | - const emailInput = ref(null); | ||
| 146 | - const passwordInput = ref(null); | ||
| 147 | - const passwordConfirmationInput = ref(null); | ||
| 148 | + const emailInput: Ref<HTMLInputElement | null> = ref(null); | ||
| 149 | + const passwordInput: Ref<HTMLInputElement | null> = ref(null); | ||
| 150 | + const passwordConfirmationInput: Ref<HTMLInputElement | null> = ref(null); | ||
| 148 | 151 | ||
| 149 | 152 | const password = ref(""); | |
| 150 | 153 | const passwordConfirmation = ref(""); | |
@@ -219,7 +222,7 @@ onMounted(async () => { | |||
| 219 | 222 | return; | |
| 220 | 223 | ||
| 221 | 224 | } | |
| 222 | - emailInput.value.focus(); | ||
| 225 | + emailInput.value?.focus(); | ||
| 223 | 226 | }); | |
| 224 | 227 | ||
| 225 | 228 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -101,7 +101,7 @@ export default class OpenSignupPlugin extends AdminForthPlugin { | |||
| 101 | 101 | } | |
| 102 | 102 | // unshift because if e.g. 2fa set it's hook, this one should be first | |
| 103 | 103 | (adminforth.config.auth.beforeLoginConfirmation as BeforeLoginConfirmationFunction[]).unshift( | |
| 104 | - async ({ adminUser }) => { | ||
| 104 | + async ({ adminUser }: { adminUser: AdminUser }): Promise<{ body: { allowedLogin: boolean }; error?: string; }> => { | ||
| 105 | 105 | if (!adminUser.dbUser[this.emailConfirmedField.name]) { | |
| 106 | 106 | return { body: { allowedLogin: false }, error: 'You need to confirm your email to be able to login' }; | |
| 107 | 107 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -328,7 +328,10 @@ function humanizeSnake(str: string): string { | |||
| 328 | 328 | watch([route, () => coreStore.resourceById], async () => { | |
| 329 | 329 | handleCustomLayout() | |
| 330 | 330 | await new Promise((resolve) => setTimeout(resolve, 0)); | |
| 331 | - const firstParam = Object.values(route.params)[0]; | ||
| 331 | + let firstParam: string | null | string[] = Object.values(route.params)[0]; | ||
| 332 | + if (typeof firstParam !== 'string') { | ||
| 333 | + firstParam = null; | ||
| 334 | + } | ||
| 332 | 335 | const resourceTitle = coreStore.resourceById[route.params?.resourceId as string]?.label || (firstParam ? humanizeSnake(firstParam as string) : null); | |
| 333 | 336 | title.value = `${coreStore.config?.title || coreStore.config?.brandName || 'Adminforth'} | ${ resourceTitle || route.meta.title || ' '}`; | |
| 334 | 337 | useHead({ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -39,7 +39,11 @@ | |||
| 39 | 39 | <form class="space-y-4" @submit.prevent> | |
| 40 | 40 | <div> | |
| 41 | 41 | <label for="username" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Your {{ coreStore.config?.usernameFieldName?.toLowerCase() }}</label> | |
| 42 | - <input type="username" name="username" id="username" | ||
| 42 | + <input | ||
| 43 | + autocomplete="username" | ||
| 44 | + type="username" | ||
| 45 | + name="username" | ||
| 46 | + id="username" | ||
| 43 | 47 | ref="usernameInput" | |
| 44 | 48 | @keydown.enter="passwordInput.focus()" | |
| 45 | 49 | class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white" placeholder="name@company.com" required /> | |
@@ -48,6 +52,7 @@ | |||
| 48 | 52 | <label for="password" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Your password</label> | |
| 49 | 53 | <input | |
| 50 | 54 | ref="passwordInput" | |
| 55 | + autocomplete="current-password" | ||
| 51 | 56 | @keydown.enter="login" | |
| 52 | 57 | :type="!showPw ? 'password': 'text'" name="password" id="password" placeholder="••••••••" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white" required /> | |
| 53 | 58 | <button type="button" @click="showPw = !showPw" class="absolute top-12 right-3 -translate-y-1/2 text-gray-400 dark:text-gray-300"> | |
| Back | FazBrowse Home | New Git URL |
0 commit comments