Skip to content

Commit

Permalink
Merge pull request #597 from YunoHost/spellcheck-shit
Browse files Browse the repository at this point in the history
forms: disable autocapitalize for usernames & spellcheck for username…
  • Loading branch information
alexAubin authored Nov 16, 2024
2 parents 665b14f + 6c2894e commit 4556ea5
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
2 changes: 2 additions & 0 deletions app/src/views/LoginView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ const fields = {
cProps: {
id: 'username',
autocomplete: 'username',
autocapitalize: 'off',
spellcheck: 'false',
},
} satisfies FieldProps<'InputItem', Form['username']>,
Expand Down
13 changes: 11 additions & 2 deletions app/src/views/PostInstall.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,23 @@ const fields = {
component: 'InputItem',
label: t('user_username'),
rules: { required, alphalownumdot_ },
cProps: { id: 'username', placeholder: t('placeholder.username') },
cProps: {
id: 'username',
placeholder: t('placeholder.username'),
autocapitalize: 'off',
spellcheck: 'false',
},
} satisfies FieldProps<'InputItem', Form['username']>,
fullname: {
component: 'InputItem',
label: t('user_fullname'),
rules: { required, name },
cProps: { id: 'fullname', placeholder: t('placeholder.fullname') },
cProps: {
id: 'fullname',
placeholder: t('placeholder.fullname'),
spellcheck: 'false',
},
} satisfies FieldProps<'InputItem', Form['fullname']>,
password: {
Expand Down
3 changes: 3 additions & 0 deletions app/src/views/user/UserCreate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ const fields = {
cProps: {
id: 'username',
placeholder: t('placeholder.username'),
autocapitalize: 'off',
spellcheck: 'false',
},
}) satisfies FieldProps<'InputItem', Form['username']>,
Expand All @@ -59,6 +61,7 @@ const fields = {
cProps: {
id: 'fullname',
placeholder: t('placeholder.fullname'),
spellcheck: 'false',
},
} satisfies FieldProps<'InputItem', Form['fullname']>,
Expand Down
8 changes: 7 additions & 1 deletion app/src/views/user/UserEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ const fields = reactive({
username: {
component: 'InputItem',
label: t('user_username'),
cProps: { id: 'username', disabled: true },
cProps: {
id: 'username',
disabled: true,
autocapitalize: 'off',
spellcheck: 'false',
},
} satisfies FieldProps<'InputItem', Form['username']>,
fullname: {
Expand All @@ -68,6 +73,7 @@ const fields = reactive({
cProps: {
id: 'fullname',
placeholder: t('placeholder.fullname'),
spellcheck: 'false',
},
} satisfies FieldProps<'InputItem', Form['fullname']>,
Expand Down

0 comments on commit 4556ea5

Please sign in to comment.