Skip to content

Commit

Permalink
Merge branch 'main' into enh/variant-card-handles
Browse files Browse the repository at this point in the history
  • Loading branch information
Emily-ejag authored Mar 20, 2024
2 parents 64ea6ce + 73e3685 commit e0baf6b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"dependencies": {
"@bdelab/roam-fluency": "^1.11.9",
"@bdelab/roar-firekit": "^4.8.8",
"@bdelab/roar-firekit": "^4.8.9",
"@bdelab/roar-letter": "^1.10.0",
"@bdelab/roar-multichoice": "^1.9.4",
"@bdelab/roar-pa": "^1.6.4",
Expand Down
12 changes: 12 additions & 0 deletions src/components/auth/SignIn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<PvInputText
:id="$t('authSignIn.emailId')"
v-model="v$.email.$model"
@keyup="checkForCapsLock"
@click="checkForCapsLock"
:class="{ 'p-invalid': invalid }"
aria-describedby="email-error"
:placeholder="$t('authSignIn.emailPlaceholder')"
Expand All @@ -25,6 +27,8 @@
<PvPassword
:id="$t('authSignIn.passwordId')"
v-model="v$.password.$model"
@keyup="checkForCapsLock"
@click="checkForCapsLock"
:class="{ 'p-invalid': invalid }"
toggle-mask
show-icon="pi pi-eye-slash"
Expand All @@ -48,6 +52,8 @@
v-else-if="allowPassword"
:id="$t('authSignIn.passwordId')"
v-model="v$.password.$model"
@keyup="checkForCapsLock"
@click="checkForCapsLock"
:class="{ 'p-invalid': invalid }"
toggle-mask
show-icon="pi pi-eye-slash"
Expand Down Expand Up @@ -96,6 +102,7 @@
:placeholder="$t('authSignIn.invalidEmailPlaceholder')"
/>
</div>
<div v-if="capsLockEnabled" class="mt-2 p-error">⇪ Caps Lock is on!</div>
</div>
</div>
<PvButton type="submit" :label="$t('authSignIn.buttonLabel') + ' &rarr;'" class="submit-button" />
Expand Down Expand Up @@ -135,6 +142,7 @@ const rules = {
};
const submitted = ref(false);
const v$ = useVuelidate(rules, state);
const capsLockEnabled = ref(false);
const handleFormSubmit = (isFormValid) => {
submitted.value = true;
Expand Down Expand Up @@ -188,6 +196,10 @@ const validateRoarEmail = _debounce(
{ maxWait: 1000 },
);
function checkForCapsLock(e) {
capsLockEnabled.value = e.getModifierState('CapsLock');
}
watch(
() => state.email,
async (email) => {
Expand Down
1 change: 1 addition & 0 deletions src/store/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export const useAuthStore = () => {
.then(() => {})
.catch((error) => {
console.error('Error signing in:', error);
throw error;
});
}
},
Expand Down

0 comments on commit e0baf6b

Please sign in to comment.