Skip to content

Commit

Permalink
feat: prevent dialogs from blocking password managers
Browse files Browse the repository at this point in the history
closes #38
  • Loading branch information
simonwep committed Jul 6, 2024
1 parent 2c559ca commit a94eb01
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/components/base/dialog/Dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ watch(
[toRef(props, 'open'), dialog],
() => {
if (props.open) {
dialog.value?.showModal();
dialog.value?.show();
requestAnimationFrame(() => (visible.value = true));
} else {
visible.value = false;
Expand Down
2 changes: 2 additions & 0 deletions src/app/components/base/form/TextField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
:id="inputId"
ref="input"
v-model="modelValue"
:name="name"
:minlength="minLength"
:maxlength="maxLength"
:required="required"
Expand Down Expand Up @@ -43,6 +44,7 @@ const modelValue = defineModel<string>();
withDefaults(
defineProps<{
type?: 'text' | 'password';
name?: string;
minLength?: number;
maxLength?: number;
required?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions src/app/pages/navigation/auth/LoginDialog.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<Dialog :open="open" :title="t('navigation.auth.welcomeBack')" @close="emit('close')">
<Form :submit-label="t('navigation.auth.signIn')" @submit="signIn">
<TextField v-model="username" required :label="t('navigation.auth.username')" type="text" />
<TextField v-model="password" required :label="t('navigation.auth.password')" type="password" />
<TextField v-model="username" required :label="t('navigation.auth.username')" type="text" name="username" />
<TextField v-model="password" required :label="t('navigation.auth.password')" type="password" name="password" />
<Alert v-if="state === 'errored'" :text="t('navigation.auth.loginFailed')" type="error" />
</Form>
</Dialog>
Expand Down

0 comments on commit a94eb01

Please sign in to comment.