Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

fix(theme): login modal fixes #319

Merged
merged 1 commit into from
Jan 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions packages/default-theme/components/SwLogin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
v-if="error"
class="sw-login__alert"
type="danger"
:message="error"
message="Cannot login with provided credentials"
/>
<SfInput
v-model="login"
name="login"
label="Your login"
v-model="email"
name="email"
label="Your email"
class="form__input"
:valid="!$v.login.$error"
:valid="!$v.email.$error"
:disabled="isLoading"
error-message="Login is required"
@blur="$v.login.$touch()"
error-message="Email is required"
@blur="$v.email.$touch()"
/>
<SfInput
v-model="password"
Expand All @@ -43,7 +43,7 @@
<script>
import { SfInput, SfButton, SfAlert } from '@storefront-ui/vue'
import { validationMixin } from 'vuelidate'
import { required } from 'vuelidate/lib/validators'
import { required, email } from 'vuelidate/lib/validators'
import { useUser } from '@shopware-pwa/composables'

export default {
Expand All @@ -52,7 +52,7 @@ export default {
mixins: [validationMixin],
data() {
return {
login: '',
email: '',
password: ''
}
},
Expand All @@ -65,8 +65,9 @@ export default {
}
},
validations: {
login: {
required
email: {
required,
email
},
password: {
required
Expand Down
2 changes: 1 addition & 1 deletion packages/default-theme/components/SwRegister.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
v-if="error"
class="sw-register__alert"
type="danger"
:message="error"
message="Cannot create a new account, the user may already exist"
/>
<SfSelect
v-model="salutation"
Expand Down
5 changes: 3 additions & 2 deletions packages/default-theme/components/modals/SwLoginModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import { SfButton, SfModal, SfAlert } from '@storefront-ui/vue'
import { useUser } from '@shopware-pwa/composables'
import SwLogin from '~/components/SwLogin'
const SwRegister = () => import('../SwRegister')
const SwResetPassword = () => import('../SwRegister')
const SwResetPassword = () => import('../SwResetPassword')

export default {
name: 'SwLoginModal',
Expand Down Expand Up @@ -116,6 +116,7 @@ export default {
}

#sw-login-modal {
z-index: 2;
box-sizing: border-box;
@include for-desktop {
max-width: 80vw;
Expand Down Expand Up @@ -159,4 +160,4 @@ export default {
.salutation {
width: 8vw;
}
</style>
</style>
4 changes: 4 additions & 0 deletions packages/default-theme/components/views/ProductView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ export default {
}
}

.product-details {
z-index: 0;
}

.images-grid {
&__row {
display: flex;
Expand Down