This repository has been archived by the owner on May 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement analytics and user consent part 1
- Loading branch information
Paul Yoon
committed
Jun 1, 2017
1 parent
d3eb6bf
commit 6826d89
Showing
11 changed files
with
148 additions
and
22 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
15 changes: 15 additions & 0 deletions
15
src/frontend/components/analytics-popup/analytics-popup.html
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,15 @@ | ||
<div class="p3 flex flex-justify border"> | ||
<div> | ||
<span>We would like to gather some data to help improve Augury but first we need your consent. Do you agree to let us collect your usage information?</span> | ||
</div> | ||
<form class="right-align"> | ||
<button class="btn btn-outline border-none pointer py1" | ||
(click)="onAnalyticsConsentChange(AnalyticsConsent.Yes)"> | ||
Yes | ||
</button> | ||
<button class="btn btn-outline border-none pointer py1" | ||
(click)="onAnalyticsConsentChange(AnalyticsConsent.No)"> | ||
No | ||
</button> | ||
</form> | ||
</div> |
29 changes: 29 additions & 0 deletions
29
src/frontend/components/analytics-popup/analytics-popup.ts
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,29 @@ | ||
import { | ||
Component, | ||
EventEmitter, | ||
Input, | ||
Output, | ||
SimpleChanges, | ||
ChangeDetectionStrategy, | ||
} from '@angular/core'; | ||
|
||
import { | ||
Options, | ||
AnalyticsConsent, | ||
} from '../../state'; | ||
|
||
@Component({ | ||
selector: 'bt-analytics-popup', | ||
template: require('./analytics-popup.html'), | ||
}) | ||
export class AnalyticsPopup { | ||
private AnalyticsConsent = AnalyticsConsent; | ||
@Input() private options: Options; | ||
|
||
@Output() private hideComponent = new EventEmitter<void>(); | ||
|
||
private onAnalyticsConsentChange = (analyticsConsent: AnalyticsConsent) => { | ||
this.options.analyticsConsent = analyticsConsent; | ||
this.hideComponent.emit(); | ||
} | ||
} |
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