Commit ea5e8da9 authored by Brendan's avatar Brendan

#188 refactor learn more component to work with mobile

parent b5801b19
Pipeline #38416040 failed with stage
in 5 minutes and 2 seconds
import { Component, EventEmitter, Input, Output } from "@angular/core";
import * as dialogs from "tns-core-modules/ui/dialogs";
@Component({
selector: "forgot-learn-more",
templateUrl: "./forgot-learn-more.component.html",
styleUrls: ["./forgot-learn-more.component.css"]
})
export class ForgotLearnMoreComponent {
@Input() confirmText: string;
@Output() logOut = new EventEmitter();
onLogOut() {
dialogs
.confirm({
message: this.confirmText,
okButtonText: "Log Out",
cancelButtonText: "Cancel"
})
.then(result => result && this.logOut.emit());
}
}
import { Component } from "@angular/core";
import { Store } from "@ngrx/store";
import { IState } from "../../../app.reducers";
import { LogoutAction } from "../.././account.actions";
@Component({
selector: "forgot-learn-more-container",
template: `
<forgot-learn-more
[confirmText]="confirmText"
(logOut)="logOut()"
></forgot-learn-more>
`
})
export class ForgotLearnMoreContainer {
confirmText =
"Please confirm that you have your backup code ready before logging out.";
constructor(private store: Store<IState>) {}
logOut() {
this.store.dispatch(new LogoutAction());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment