Skip to content

Commit

Permalink
fix: update global components
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogobbosouza committed Dec 13, 2021
1 parent d08c062 commit 8e90848
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
8 changes: 4 additions & 4 deletions src/layouts/Auth.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<div class="bg-gray-200 h-screen flex flex-col items-center justify-center text-gray-700">
<div class="mb-6 grid gap-4">
<img
v-if="$auth.admin.options.logo"
:src="$auth.admin.options.logo"
:alt="$auth.admin.options.name"
v-if="$admin.options.logo"
:src="$admin.options.logo"
:alt="$admin.options.name"
class="max-h-48 mx-auto"
/>

<span
v-else
v-text="$auth.admin.options.name"
v-text="$admin.options.name"
class="text-2xl font-semibold text-center"
/>
</div>
Expand Down
9 changes: 7 additions & 2 deletions src/views/ForgotPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<InputText v-model="form.username" />
</AdminField>
<div class="flex flex-col lg:flex-row-reverse space-y-4 lg:space-y-0 items-center justify-between">
<Button
<AdminButton
type="submit"
icon="pi pi-send"
label="Esqueci minha senha"
:loading="loading"
/>
<Button
<AdminButton
v-if="$auth.options.routes.login.enabled"
@click="$admin.visit({ name: $auth.options.routes.login.name })"
label="Voltar"
Expand All @@ -23,9 +23,14 @@

<script>
import { ref, reactive } from 'vue'
import InputText from 'primevue/inputtext'
import { useAuth } from '@/'
export default {
components: {
InputText
},
setup () {
const auth = useAuth()
const loading = ref(false)
Expand Down
10 changes: 6 additions & 4 deletions src/views/Login.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<template>
<form method="post" @submit.prevent="submit">
<AdminField label="Usuário">
<InputText v-model="form.username" />
<InputText v-model="form.username" autocomplete="username" />
</AdminField>
<AdminField label="Senha">
<Password v-model="form.password" :feedback="false" class="w-full" />
<Password v-model="form.password" :feedback="false" class="w-full" autocomplete="current-password" />
</AdminField>
<div class="flex items-center justify-between">
<Button
<AdminButton
v-if="$auth.options.routes.forgotPassword.enabled"
@click="$admin.visit({ name: $auth.options.routes.forgotPassword.name })"
label="Esqueci minha senha"
class="p-button-text p-button-sm"
/>
<Button
<AdminButton
type="submit"
icon="pi pi-lock"
label="Entrar"
Expand All @@ -25,11 +25,13 @@

<script>
import { ref, reactive } from 'vue'
import InputText from 'primevue/inputtext'
import Password from 'primevue/password'
import { useAuth } from '@/'
export default {
components: {
InputText,
Password
},
Expand Down
6 changes: 3 additions & 3 deletions src/views/ResetPassword.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<template>
<form method="post" @submit.prevent="submit">
<AdminField label="Nova senha">
<Password v-model="form.password" toggleMask class="w-full" />
<Password v-model="form.password" toggleMask class="w-full" autocomplete="new-password" />
</AdminField>
<AdminField label="Confirme a nova senha">
<Password v-model="form.password_confirmation" toggleMask class="w-full" />
<Password v-model="form.password_confirmation" toggleMask class="w-full" autocomplete="new-password" />
</AdminField>
<Button type="submit" label="Alterar senha" :loading="loading" />
<AdminButton type="submit" label="Alterar senha" :loading="loading" />
</form>
</template>

Expand Down

0 comments on commit 8e90848

Please sign in to comment.