Skip to content

Commit eb313b0

Browse files
update for Vue style of login, create-account, password cards
1 parent c7668c0 commit eb313b0

File tree

3 files changed

+44
-58
lines changed

3 files changed

+44
-58
lines changed

packages/devextreme-cli/src/templates/vue-v3/application/src/views/create-account-form.vue

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,6 @@
4646
>
4747
</dx-button-options>
4848
</dx-button-item>
49-
<dx-item>
50-
<template #default>
51-
<div class="login-link">
52-
Have an account? <router-link to="/login-form">Sign In</router-link>
53-
</div>
54-
</template>
55-
</dx-item>
5649
<template #createAccount>
5750
<div>
5851
<span class="dx-button-text">
@@ -62,6 +55,9 @@
6255
</div>
6356
</template>
6457
</dx-form>
58+
<div class="login-link">
59+
Have an account? <router-link to="/login-form">Sign In</router-link>
60+
</div>
6561
</form>
6662
</template>
6763

@@ -104,28 +100,28 @@ export default {
104100
});
105101
106102
const onSubmit = async () => {
107-
const { email, password } = formData;
108-
loading.value = true;
103+
const { email, password } = formData;
104+
loading.value = true;
109105
110-
const result = await auth.createAccount(email, password);
111-
loading.value = false;
106+
const result = await auth.createAccount(email, password);
107+
loading.value = false;
112108
113-
if (result.isOk) {
114-
router.push("/login-form");
115-
} else {
116-
notify(result.message, 'error', 2000);
117-
}
118-
};
109+
if (result.isOk) {
110+
router.push("/login-form");
111+
} else {
112+
notify(result.message, 'error', 2000);
113+
}
114+
};
119115
120116
function confirmPassword(e) {
121117
return e.value === formData.password;
122118
}
123119
124120
return {
125-
formData,
126-
loading,
127-
onSubmit,
128-
confirmPassword
121+
formData,
122+
loading,
123+
onSubmit,
124+
confirmPassword
129125
}
130126
}
131127
}
@@ -134,9 +130,8 @@ export default {
134130
<style lang="scss">
135131
.create-account-form {
136132
.policy-info {
137-
margin: 10px 0;
138133
color: var(--base-text-color-alpha-7);
139-
font-size: 14px;
134+
font-size: 12px;
140135
font-style: normal;
141136
142137
a {
@@ -146,8 +141,10 @@ export default {
146141
147142
.login-link {
148143
color: var(--base-accent);
149-
font-size: 16px;
144+
font-size: 12px;
150145
text-align: center;
146+
padding: 6px 0 32px 0;
147+
border-bottom: 1px solid var(--border-color);
151148
}
152149
}
153150
</style>

packages/devextreme-cli/src/templates/vue-v3/application/src/views/login-form.vue

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,6 @@
3434
>
3535
</dx-button-options>
3636
</dx-button-item>
37-
<dx-item>
38-
<template #default>
39-
<div class="link">
40-
<router-link to="/reset-password">Forgot password?</router-link>
41-
</div>
42-
</template>
43-
</dx-item>
44-
<dx-button-item>
45-
<dx-button-options
46-
text="Create an account"
47-
width="100%"
48-
:on-click="onCreateAccountClick"
49-
/>
50-
</dx-button-item>
5137
<template #signInTemplate>
5238
<div>
5339
<span class="dx-button-text">
@@ -57,6 +43,14 @@
5743
</div>
5844
</template>
5945
</dx-form>
46+
<div class="link">
47+
<router-link to="/reset-password">Forgot password?</router-link>
48+
</div>
49+
<dx-button
50+
text="Create an account"
51+
width="100%"
52+
@click="onCreateAccountClick"
53+
/>
6054
</form>
6155
</template>
6256

@@ -70,6 +64,7 @@ import DxForm, {
7064
DxButtonItem,
7165
DxButtonOptions
7266
} from "devextreme-vue/form";
67+
import { DxButton } from 'devextreme-vue';
7368
import notify from 'devextreme/ui/notify';
7469
7570
import auth from "../auth";
@@ -119,26 +114,23 @@ export default {
119114
DxItem,
120115
DxLabel,
121116
DxButtonItem,
122-
DxButtonOptions
117+
DxButtonOptions,
118+
DxButton
123119
}
124120
};
125121
</script>
126122

127123
<style lang="scss">
128124
.login-form {
125+
:deep(.form-text) {
126+
color: var(--base-text-color-alpha-7);
127+
}
128+
129129
.link {
130130
text-align: center;
131-
font-size: 16px;
131+
font-size: 12px;
132132
font-style: normal;
133-
134-
a {
135-
text-decoration: none;
136-
}
137-
}
138-
139-
.form-text {
140-
margin: 10px 0;
141-
color: var(--base-text-color-alpha-7);
133+
margin: 6px 0 50px;
142134
}
143135
}
144136
</style>

packages/devextreme-cli/src/templates/vue-v3/application/src/views/reset-password-form.vue

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@
2020
>
2121
</dx-button-options>
2222
</dx-button-item>
23-
<dx-item>
24-
<template #default>
25-
<div class="login-link">
26-
Return to <router-link to="/login-form">Sign In</router-link>
27-
</div>
28-
</template>
29-
</dx-item>
3023
<template #resetTemplate>
3124
<div>
3225
<span class="dx-button-text">
@@ -36,6 +29,9 @@
3629
</div>
3730
</template>
3831
</dx-form>
32+
<div class="login-link">
33+
Return to <router-link to="/login-form">Sign In</router-link>
34+
</div>
3935
</form>
4036
</template>
4137

@@ -103,13 +99,14 @@ export default {
10399
<style lang="scss">
104100
.reset-password-form {
105101
.submit-button {
106-
margin-top: 10px;
102+
margin-top: 18px;
107103
}
108104
109105
.login-link {
110106
color: var(--base-accent);
111-
font-size: 16px;
107+
font-size: 12px;
112108
text-align: center;
109+
margin-top: 6px;
113110
}
114111
}
115112
</style>

0 commit comments

Comments
 (0)