Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed form msgs showing badly #281

Merged
merged 3 commits into from
Dec 29, 2017
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
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import Btn from '@nylira/vue-button'
import Field from '@nylira/vue-field'
import FieldGroup from 'common/NiFieldGroup'
import FormGroup from 'common/NiFormGroup'
import FormMsg from '@nylira/vue-form-msg'
import FormMsg from 'common/NiFormMsg'
import FormStruct from 'common/NiFormStruct'
export default {
name: 'ni-session-account-delete',
Expand Down
4 changes: 2 additions & 2 deletions app/src/renderer/components/common/NiSessionImport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
type="password"
placeholder="at least 10 characters"
v-model="fields.importPassword")
form-msg(body="Create a password to secure your imported account")
form-msg Create a password to secure your imported account
form-msg(name='Password' type='required' v-if='!$v.fields.importPassword.required')
form-msg(name='Password' type='minLength' min="10" v-if='!$v.fields.importPassword.minLength')
.ni-session-footer
Expand All @@ -41,7 +41,7 @@ import Field from '@nylira/vue-field'
import FieldGroup from 'common/NiFieldGroup'
import FieldSeed from 'common/NiFieldSeed'
import FormGroup from 'common/NiFormGroup'
import FormMsg from '@nylira/vue-form-msg'
import FormMsg from 'common/NiFormMsg'
import FormStruct from 'common/NiFormStruct'
export default {
name: 'ni-session-import',
Expand Down
8 changes: 5 additions & 3 deletions app/src/renderer/components/common/NiSessionSignUp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@

form-group(field-id='sign-up-seed' field-label='Seed (write it down)')
field-seed#sign-up-seed(v-model="fields.signUpSeed" disabled)
form-msg(body='Please back up this seed phrase. These words cannot be recovered!')
form-msg
| Please back up the seed phrase for this account. These words cannot be recovered!

form-group(:error='$v.fields.signUpPassword.$error'
field-id='sign-in-password' field-label='Password')
field#sign-in-password(
type="password"
placeholder="at least 10 characters"
v-model="fields.signUpPassword")
form-msg(body="Create a password to secure your new account")
form-msg
| Create a password to secure your new account
form-msg(name='Password' type='required' v-if='!$v.fields.signUpPassword.required')
form-msg(name='Password' type='minLength' min="10" v-if='!$v.fields.signUpPassword.minLength')

Expand Down Expand Up @@ -55,7 +57,7 @@ import Field from '@nylira/vue-field'
import FieldSeed from 'common/NiFieldSeed'
import FieldGroup from 'common/NiFieldGroup'
import FormGroup from 'common/NiFormGroup'
import FormMsg from '@nylira/vue-form-msg'
import FormMsg from 'common/NiFormMsg'
import FormStruct from 'common/NiFormStruct'
export default {
name: 'ni-session-sign-up',
Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/components/wallet/PageSend.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import Field from '@nylira/vue-field'
import FieldAddon from 'common/NiFieldAddon'
import FieldGroup from 'common/NiFieldGroup'
import FormGroup from 'common/NiFormGroup'
import FormMsg from '@nylira/vue-form-msg'
import FormMsg from 'common/NiFormMsg'
import FormStruct from 'common/NiFormStruct'
import Page from 'common/NiPage'
import Part from 'common/NiPart'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exports[`NiSessionAccountDelete has the expected html structure 1`] = `
<label for=\\"sign-in-password\\" class=\\"ni-form-group__label\\">Password</label>
<div class=\\"ni-form-group__field\\">
<input type=\\"password\\" placeholder=\\"Enter your password\\" class=\\"ni-field\\" id=\\"sign-in-password\\">
<div class=\\"ni-form-msg ni-form-msg-error\\">
<div class=\\"ni-form-msg sm ni-form-msg--error\\">
Password is required
</div>
<!---->
Expand All @@ -33,7 +33,7 @@ exports[`NiSessionAccountDelete has the expected html structure 1`] = `
</div>
<label for=\\"sign-up-warning\\" class=\\"ni-field-checkbox-label\\">I understand that Cosmos cannot recover deleted accounts without the passphrase.</label>
</div>
<div class=\\"ni-form-msg ni-form-msg-error\\">
<div class=\\"ni-form-msg sm ni-form-msg--error\\">
Deletion confirmation is required
</div>
</div>
Expand Down
14 changes: 7 additions & 7 deletions test/unit/specs/__snapshots__/NISessionSignUp.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exports[`NISessionSignUp has the expected html structure 1`] = `
<label for=\\"sign-up-name\\" class=\\"ni-form-group__label\\">Account Name</label>
<div class=\\"ni-form-group__field\\">
<input type=\\"text\\" placeholder=\\"at least 5 characters\\" class=\\"ni-field\\" id=\\"sign-up-name\\">
<div class=\\"ni-form-msg ni-form-msg-error\\">
<div class=\\"ni-form-msg sm ni-form-msg--error\\">
Name is required
</div>
<!---->
Expand All @@ -28,19 +28,19 @@ exports[`NISessionSignUp has the expected html structure 1`] = `
<label for=\\"sign-up-seed\\" class=\\"ni-form-group__label\\">Seed (write it down)</label>
<div class=\\"ni-form-group__field\\">
<textarea class=\\"ni-field-seed ni-field\\" id=\\"sign-up-seed\\" disabled=\\"disabled\\"></textarea>
<div class=\\"ni-form-msg ni-form-msg-desc\\">
Please back up this seed phrase. These words cannot be recovered!
<div class=\\"ni-form-msg sm ni-form-msg--desc\\">
Please back up the seed phrase for this account. These words cannot be recovered!
</div>
</div>
</div>
<div class=\\"ni-form-group\\">
<label for=\\"sign-in-password\\" class=\\"ni-form-group__label\\">Password</label>
<div class=\\"ni-form-group__field\\">
<input type=\\"password\\" placeholder=\\"at least 10 characters\\" class=\\"ni-field\\" id=\\"sign-in-password\\">
<div class=\\"ni-form-msg ni-form-msg-desc\\">
<div class=\\"ni-form-msg sm ni-form-msg--desc\\">
Create a password to secure your new account
</div>
<div class=\\"ni-form-msg ni-form-msg-error\\">
<div class=\\"ni-form-msg sm ni-form-msg--error\\">
Password is required
</div>
<!---->
Expand All @@ -55,7 +55,7 @@ exports[`NISessionSignUp has the expected html structure 1`] = `
</div>
<label for=\\"sign-up-warning\\" class=\\"ni-field-checkbox-label\\">I understand that lost seeds cannot be recovered.</label>
</div>
<div class=\\"ni-form-msg ni-form-msg-error\\">
<div class=\\"ni-form-msg sm ni-form-msg--error\\">
Recovery confirmation is required
</div>
</div>
Expand All @@ -69,7 +69,7 @@ exports[`NISessionSignUp has the expected html structure 1`] = `
</div>
<label for=\\"sign-up-backup\\" class=\\"ni-field-checkbox-label\\">I have securely written down my seed.</label>
</div>
<div class=\\"ni-form-msg ni-form-msg-error\\">
<div class=\\"ni-form-msg sm ni-form-msg--error\\">
Backup confirmation is required
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions test/unit/specs/__snapshots__/NiSessionImport.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exports[`NiSessionImport has the expected html structure 1`] = `
<label for=\\"import-name\\" class=\\"ni-form-group__label\\">Account Name</label>
<div class=\\"ni-form-group__field\\">
<input type=\\"text\\" placeholder=\\"at least 5 characters\\" class=\\"ni-field\\" id=\\"import-name\\">
<div class=\\"ni-form-msg ni-form-msg-error\\">
<div class=\\"ni-form-msg sm ni-form-msg--error\\">
Name is required
</div>
<!---->
Expand All @@ -28,7 +28,7 @@ exports[`NiSessionImport has the expected html structure 1`] = `
<label for=\\"import-seed\\" class=\\"ni-form-group__label\\">Seed</label>
<div class=\\"ni-form-group__field\\">
<textarea class=\\"ni-field-seed ni-field\\" id=\\"import-seed\\" placeholder=\\"must be exactly 12 words\\"></textarea>
<div class=\\"ni-form-msg ni-form-msg-error\\">
<div class=\\"ni-form-msg sm ni-form-msg--error\\">
Seed is required
</div>
</div>
Expand All @@ -37,10 +37,10 @@ exports[`NiSessionImport has the expected html structure 1`] = `
<label for=\\"import-password\\" class=\\"ni-form-group__label\\">Password</label>
<div class=\\"ni-form-group__field\\">
<input type=\\"password\\" placeholder=\\"at least 10 characters\\" class=\\"ni-field\\" id=\\"import-password\\">
<div class=\\"ni-form-msg ni-form-msg-desc\\">
<div class=\\"ni-form-msg sm ni-form-msg--desc\\">
Create a password to secure your imported account
</div>
<div class=\\"ni-form-msg ni-form-msg-error\\">
<div class=\\"ni-form-msg sm ni-form-msg--error\\">
Password is required
</div>
<!---->
Expand Down
6 changes: 3 additions & 3 deletions test/unit/specs/__snapshots__/PageSend.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ exports[`PageSend has the expected html structure 1`] = `
</div>
</div>
<div
class="ni-form-msg ni-form-msg-error"
class="ni-form-msg sm ni-form-msg--error"
>
Denomination is required
</div>
Expand Down Expand Up @@ -447,7 +447,7 @@ exports[`PageSend has the expected html structure 1`] = `
/>
</div>
<div
class="ni-form-msg ni-form-msg-error"
class="ni-form-msg sm ni-form-msg--error"
>
Address is required
</div>
Expand Down Expand Up @@ -478,7 +478,7 @@ exports[`PageSend has the expected html structure 1`] = `
/>
</div>
<div
class="ni-form-msg ni-form-msg-error"
class="ni-form-msg sm ni-form-msg--error"
>
Amount is required
</div>
Expand Down