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

Commit

Permalink
perf(setup): speed up setup transitions
Browse files Browse the repository at this point in the history
  • Loading branch information
devinus committed Feb 24, 2018
1 parent 19513e8 commit 336664e
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions app/transitions.js
@@ -1,30 +1,35 @@
export default function () {
this.transition(
this.hasClass('toLeft'),
this.fromRoute('setup.index'),
this.toRoute('setup.import'),
this.use('toLeft'),
this.reverse('toRight'),
);
const duration = 100;

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'),
this.reverse('toRight'),
this.use('toLeft', { duration }),
this.reverse('toRight', { duration }),
);

this.transition(
this.hasClass('toLeft'),
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'),
this.reverse('toRight'),
this.use('toLeft', { duration }),
this.reverse('toRight', { duration }),
);
}

0 comments on commit 336664e

Please sign in to comment.