This repository has been archived by the owner on Oct 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(wallets): use a modal for wallet settings and smooth transitions
- Loading branch information
Showing
17 changed files
with
65 additions
and
165 deletions.
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
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
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
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
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 |
---|---|---|
@@ -1,81 +1,9 @@ | ||
export default function () { | ||
const duration = 100; | ||
this.transition( | ||
this.hasClass('hide-history'), | ||
|
||
// this makes our rule apply when the liquid-if transitions to the | ||
// true state. | ||
this.toValue(false), | ||
this.use('fade', { duration: 250 }), | ||
this.reverse('fade', { duration: 250 }), | ||
); | ||
this.transition( | ||
this.hasClass('hide-balance'), | ||
|
||
// this makes our rule apply when the liquid-if transitions to the | ||
// true state. | ||
this.toValue(false), | ||
this.use('toUp', { duration: 300 }), | ||
this.reverse('toUp', { duration: 300 }), | ||
); | ||
this.transition( | ||
this.hasClass('hide-qr'), | ||
|
||
// this makes our rule apply when the liquid-if transitions to the | ||
// true state. | ||
this.toValue(false), | ||
this.use('fade', { duration: 500 }), | ||
|
||
// which means we can also apply a reverse rule for transitions to | ||
// the false state. | ||
this.reverse('fade', { duration: 500 }), | ||
); | ||
|
||
this.transition( | ||
this.fromRoute('wallets.overview'), | ||
this.toRoute('wallets.overview.accounts.history'), | ||
this.hasClass('history'), | ||
this.use('wait', 3000, { then: 'toUp' }), | ||
this.reverse('wait', 3000, { then: 'toDown' }), | ||
); | ||
|
||
this.transition( | ||
this.hasClass('toLeft'), | ||
this.fromRoute('setup'), | ||
this.toRoute('setup.index'), | ||
this.use('fade'), | ||
this.reverse('fade'), | ||
); | ||
|
||
this.transition( | ||
this.hasClass('toLeft'), | ||
this.fromRoute('setup.index'), | ||
this.toRoute('setup.backup'), | ||
this.use('toLeft', { duration }), | ||
this.reverse('toRight', { duration }), | ||
); | ||
|
||
this.transition( | ||
this.hasClass('toLeft'), | ||
this.hasClass('setup-step'), | ||
this.fromRoute('setup.index'), | ||
this.toRoute('setup.import'), | ||
this.use('toLeft', { duration }), | ||
this.reverse('toRight', { duration }), | ||
); | ||
|
||
this.transition( | ||
this.hasClass('toLeft'), | ||
this.fromRoute('setup.backup'), | ||
this.toRoute('setup.password'), | ||
this.use('toLeft', { duration }), | ||
this.reverse('toRight', { duration }), | ||
); | ||
|
||
this.transition( | ||
this.fromRoute('wallets.overview'), | ||
this.toRoute('wallets.overview.accounts.send'), | ||
this.hasClass('send-outlet'), | ||
this.use('wait', 1000, { then: 'fade' }), | ||
this.reverse('wait', 1000, { then: 'fade' }), | ||
this.use('toLeft', { duration: 100 }), | ||
this.reverse('toRight', { duration: 100 }), | ||
); | ||
} |
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
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
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import Route from '@ember/routing/route'; | ||
|
||
import { action } from 'ember-decorators/object'; | ||
|
||
export default Route.extend({ | ||
renderTemplate() { | ||
this.render('wallets/overview/settings', { | ||
into: 'wallets', | ||
outlet: 'walletSettings', | ||
}); | ||
}, | ||
|
||
@action | ||
cancel() { | ||
return this.transitionTo('wallets.overview'); | ||
}, | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{#bs-modal onHide=(route-action 'cancel') as |modal|}} | ||
{{#modal.header}} | ||
<h4 class="modal-title"> | ||
{{t 'walletSettings'}} | ||
</h4> | ||
{{/modal.header}} | ||
{{#modal.body}} | ||
{{wallet-settings wallet=model representative=model.representative onChangeRepresentative=(route-action 'changeRepresentative') onChangePassword=(route-action 'changePassword')}} | ||
{{/modal.body}} | ||
{{/bs-modal}} |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
{{navigation-bar wallet=model onChangeRepresentative=(route-action 'changeRepresentative') onCreateAccount=(route-action 'createAccount') onChangePassword=(route-action 'changePassword')}} | ||
{{navigation-bar wallet=model onCreateAccount=(route-action 'createAccount')}} | ||
|
||
<main role="main"> | ||
{{notification-center}} | ||
|
||
{{outlet}} | ||
|
||
{{outlet 'walletSettings'}} | ||
</main> |
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
This file was deleted.
Oops, something went wrong.