-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
118 changed files
with
1,599 additions
and
1,147 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
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,23 +1,14 @@ | ||
import { action } from '@ember/object'; | ||
import Transition from '@ember/routing/-private/transition'; | ||
import Route from '@ember/routing/route'; | ||
import { inject as service } from '@ember/service'; | ||
import Session from 'ember-simple-auth/services/session'; | ||
|
||
import Analytics from 'ember-osf-web/services/analytics'; | ||
|
||
export default class Goodbye extends Route { | ||
@service analytics!: Analytics; | ||
@service session!: Session; | ||
|
||
async beforeModel(transition: Transition) { | ||
await super.beforeModel(transition); | ||
const queryParams = this.session.isAuthenticated ? {} : { goodbye: true }; | ||
this.transitionTo('home', { queryParams }); | ||
} | ||
|
||
@action | ||
didTransition() { | ||
this.analytics.trackPage(); | ||
} | ||
} |
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,25 +1,7 @@ | ||
import { action } from '@ember/object'; | ||
import Route from '@ember/routing/route'; | ||
import { inject as service } from '@ember/service'; | ||
|
||
import Node from 'ember-osf-web/models/node'; | ||
import { GuidRouteModel } from 'ember-osf-web/resolve-guid/guid-route'; | ||
import Analytics from 'ember-osf-web/services/analytics'; | ||
import Ready from 'ember-osf-web/services/ready'; | ||
|
||
export default class GuidNodeForks extends Route { | ||
@service analytics!: Analytics; | ||
@service ready!: Ready; | ||
|
||
model() { | ||
return this.modelFor('guid-node'); | ||
} | ||
|
||
@action | ||
async didTransition() { | ||
const { taskInstance } = this.controller.model as GuidRouteModel<Node>; | ||
await taskInstance; | ||
const node = taskInstance.value; | ||
this.analytics.trackPage(node ? node.public : undefined, 'nodes'); | ||
} | ||
} |
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,25 +1,12 @@ | ||
import { action } from '@ember/object'; | ||
import Route from '@ember/routing/route'; | ||
import { inject as service } from '@ember/service'; | ||
|
||
import Registration from 'ember-osf-web/models/registration'; | ||
import { GuidRouteModel } from 'ember-osf-web/resolve-guid/guid-route'; | ||
import Analytics from 'ember-osf-web/services/analytics'; | ||
import Ready from 'ember-osf-web/services/ready'; | ||
|
||
export default class GuidRegistrationForks extends Route { | ||
@service analytics!: Analytics; | ||
@service ready!: Ready; | ||
|
||
model() { | ||
return this.modelFor('guid-registration'); | ||
} | ||
|
||
@action | ||
async didTransition() { | ||
const { taskInstance } = this.controller.model as GuidRouteModel<Registration>; | ||
await taskInstance; | ||
const registration = taskInstance.value; | ||
this.analytics.trackPage(registration ? registration.public : undefined, 'registrations'); | ||
} | ||
} |
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
Oops, something went wrong.