This repository has been archived by the owner on Jul 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: CDK uploads data to online service without end-user consent (#127)
This change ads a screen the user will see after they click the report issue menu option. This screen will both educate the user that data will get uploaded as well as provide an opportunity for them to cancel if they choose to.
- Loading branch information
Showing
6 changed files
with
70 additions
and
2 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
13 changes: 13 additions & 0 deletions
13
src/app/editor/report-issue/report-issue-modal/report-issue-modal.component.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,13 @@ | ||
<div mat-dialog-content> | ||
<div class="header layout-row layout-align-start-center"> | ||
<h1> | ||
Report Issue | ||
<small>Thank you for taking the time to report an issue. When you click the the Report Issue button, Microsoft will send information about your local development environment to assist with troubleshooting.</small> | ||
</h1> | ||
</div> | ||
</div> | ||
|
||
<div mat-dialog-actions> | ||
<button mat-button (click)="reportIssue()">Report Issue</button> | ||
<button mat-button (click)="dialog.close()">Close</button> | ||
</div> |
12 changes: 12 additions & 0 deletions
12
src/app/editor/report-issue/report-issue-modal/report-issue-modal.component.scss
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,12 @@ | ||
@import '../../../assets/styles/declarations'; | ||
|
||
.header { | ||
h1 { | ||
font-weight: normal; | ||
|
||
small { | ||
display: block; | ||
font-size: 0.4em; | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/app/editor/report-issue/report-issue-modal/report-issue-modal.component.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,25 @@ | ||
import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
import { MatDialogRef } from '@angular/material'; | ||
import { Store } from '@ngrx/store'; | ||
import { ReportGenericError } from '../../bedrock.actions'; | ||
import * as fromRoot from '../../bedrock.reducers'; | ||
|
||
/** | ||
* The ReportIssueModalComponent lets the user know that Microsoft will | ||
* send diagnostic data from their local dev environment to assist with | ||
* troubleshooting. | ||
*/ | ||
@Component({ | ||
selector: 'report-issue-modal', | ||
templateUrl: './report-issue-modal.component.html', | ||
styleUrls: ['./report-issue-modal.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class ReportIssueModalComponent { | ||
constructor(private readonly dialog: MatDialogRef<void>, private readonly store: Store<fromRoot.IState>) {} | ||
|
||
public reportIssue() { | ||
this.store.dispatch(new ReportGenericError('My Error Report', 'Enter your details here')); | ||
this.dialog.close(); | ||
} | ||
} |
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,16 @@ | ||
import { CommonModule } from '@angular/common'; | ||
import { NgModule } from '@angular/core'; | ||
import { MomentModule } from 'angular2-moment'; | ||
|
||
import { MatButtonModule, MatDialogModule } from '@angular/material'; | ||
import { ReportIssueModalComponent } from './report-issue-modal/report-issue-modal.component'; | ||
|
||
/** | ||
* Module that displays the "Report Issue" dialog. | ||
*/ | ||
@NgModule({ | ||
imports: [MomentModule, CommonModule, MatButtonModule, MatDialogModule], | ||
declarations: [ReportIssueModalComponent], | ||
entryComponents: [ReportIssueModalComponent], | ||
}) | ||
export class ReportIssueModule {} |