-
Notifications
You must be signed in to change notification settings - Fork 98
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
Ana/emoney sendmodal multiple denoms #3370
Merged
Merged
Changes from 3 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
fcf4d07
first changes
Bitcoinera d7af96c
working for first balance in array
Bitcoinera c4fca1c
allow selecting token. add selected balance.
Bitcoinera c2283db
fix validation selectedToken
Bitcoinera 71b7cff
make compatible with the one token networks
Bitcoinera b9b69a5
make compatible for all networks. styling
Bitcoinera 54f61b2
simplify code
Bitcoinera 153180c
fix validations
Bitcoinera 1c8364a
update snapshot
Bitcoinera 7d88ce4
sendmodal fix test and update snapshot
Bitcoinera a1a4273
add tests
Bitcoinera 0b4a87a
Merge branch 'develop' of https://github.com/luniehq/lunie into ana/e…
Bitcoinera 4b5339a
change position. set amount to 0 in each selection
Bitcoinera 8df4d5e
fix first load. styling
Bitcoinera c0b7c7f
update snapshot
Bitcoinera 647cb39
remove ellipsis from form
Bitcoinera 61f3dbd
bust dep cache
faboweb 1667e86
Merge branch 'ana/emoney-sendmodal-multiple-denoms' of https://github…
faboweb 43ee7e5
added vue-jest
faboweb f29e387
update snapshot
Bitcoinera e4d6d61
changelog
Bitcoinera File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ | |
v-model.number="$v.address.$model" | ||
v-focus | ||
type="text" | ||
placeholder="Address" | ||
placeholder="Address..." | ||
@keyup.enter.native="refocusOnAmount" | ||
/> | ||
<TmFormMsg | ||
|
@@ -38,6 +38,28 @@ | |
/> | ||
</TmFormGroup> | ||
<TmFormGroup | ||
v-if="getDenoms.length > 1" | ||
:error="$v.selectedToken.$error" | ||
class="action-modal-form-group" | ||
field-id="selected-token" | ||
field-label="Token" | ||
> | ||
<TmField | ||
id="token" | ||
v-model="selectedToken" | ||
:title="`Select the token you wish to operate with`" | ||
:options="getDenoms" | ||
placeholder="Select the token" | ||
type="select" | ||
/> | ||
<TmFormMsg | ||
v-if="$v.selectedToken.$error && !$v.selectedToken.required" | ||
name="Token" | ||
type="required" | ||
/> | ||
</TmFormGroup> | ||
<TmFormGroup | ||
id="form-group-amount" | ||
:error="$v.amount.$error && $v.amount.$invalid" | ||
class="action-modal-form-group" | ||
field-id="amount" | ||
|
@@ -93,27 +115,6 @@ | |
class="tm-form-msg--desc max-message" | ||
/> | ||
</TmFormGroup> | ||
<TmFormGroup | ||
v-if="getDenoms.length > 1" | ||
:error="$v.selectedToken.$error" | ||
class="action-modal-form-group" | ||
field-id="selected-token" | ||
field-label="Token" | ||
> | ||
<TmField | ||
id="token" | ||
v-model="selectedToken" | ||
:title="`Select the token you wish to operate with`" | ||
:options="getDenoms" | ||
placeholder="Select the token" | ||
type="select" | ||
/> | ||
<TmFormMsg | ||
v-if="$v.selectedToken.$error && !$v.selectedToken.required" | ||
name="Token" | ||
type="required" | ||
/> | ||
</TmFormGroup> | ||
<a v-if="editMemo === false" id="edit-memo-btn" @click="showMemo()"> | ||
Need to edit the memo field? | ||
</a> | ||
|
@@ -183,6 +184,7 @@ export default { | |
memo: defaultMemo, | ||
max_memo_characters: 256, | ||
editMemo: false, | ||
isFirstLoad: true, | ||
selectedToken: ``, | ||
selectedBalance: ``, | ||
balances: [ | ||
|
@@ -222,6 +224,17 @@ export default { | |
return this.denoms.map(denom => (denom = { key: denom, value: denom })) | ||
} | ||
}, | ||
watch: { | ||
// we set the amount in the input to zero every time the user selects another token so they | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice! |
||
// realize they are dealing with a different balance each time | ||
selectedToken: function() { | ||
if (!this.isFirstLoad) { | ||
this.amount = 0 | ||
} else { | ||
this.isFirstLoad = false | ||
} | ||
} | ||
}, | ||
mounted() { | ||
this.$apollo.queries.balance.refetch() | ||
}, | ||
|
@@ -364,8 +377,7 @@ export default { | |
cursor: pointer; | ||
} | ||
|
||
#token { | ||
width: 155px; | ||
margin-bottom: 10px; | ||
#form-group-amount { | ||
margin-bottom: 30px; | ||
} | ||
</style> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what Charlie's flow showed 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah ok. sorry about that. let's remove it for now since it would be inconsistent with all our forms.