-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clear login data #51
base: main
Are you sure you want to change the base?
Clear login data #51
Changes from all commits
358e822
11b8993
80e945b
d5418c0
45b321f
fc63fb3
2a22775
365a304
bbc94d9
d7e79c6
d028344
73249f9
5c21730
783bd01
3020d0a
15ce3b0
e75f789
09305e4
669fbb4
a96cff7
841695b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<app-banner></app-banner> | ||
|
||
<div | ||
class="container home-container" | ||
*ngIf="globalVars.inTab || globalVars.webview" | ||
> | ||
<div class="font-weight-bold fs-30px mb-20px">Clear Login Data</div> | ||
<div class="fs-15px"> | ||
Confirming this step will remove your login data from your browser. If you | ||
use a seedphrase to login to your account, make sure you have recorded this | ||
securely. | ||
</div> | ||
<div class="fc-red fs-18px pt-15px"> | ||
Enter "<b>I understand log me out</b>" to confirm you want to clear your | ||
login data. | ||
</div> | ||
<div class="form-group pt-10px"> | ||
<textarea | ||
[(ngModel)]="clearAccountCheck" | ||
class="form-control fs-15px" | ||
rows="4" | ||
></textarea> | ||
</div> | ||
<div class="d-flex align-items-center" style="margin-top: -15px"> | ||
<div class="fs-12px mt-15px text-grey6"> | ||
By proceeding, you agree that you will need to re-enter your seed phrase | ||
on login to access your account. | ||
</div> | ||
</div> | ||
<div class="d-flex pt-15px justify-content-between"> | ||
<button | ||
class="btn btn-outline-primary font-weight-bold fs-15px sign-up-btn" | ||
[routerLink]="['/log-in']" | ||
> | ||
Back | ||
</button> | ||
<div> | ||
<button | ||
*ngIf="clearAccountCheck == 'I understand log me out'" | ||
(click)="clearAccounts()" | ||
class="btn btn-primary font-weight-bold fs-15px ml-10px sign-up-btn" | ||
[routerLink]="['/log-in']" | ||
> | ||
Confirm | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also changed this button text from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
</button> | ||
<!-- Show blocked button if text entered does not equal required text--> | ||
<button | ||
*ngIf="clearAccountCheck !== 'I understand log me out'" | ||
class="btn btn-primary font-weight-bold fs-15px ml-10px sign-up-btn" | ||
disabled | ||
> | ||
Confirm | ||
</button> | ||
</div> | ||
</div> | ||
</div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ClearAccountComponent } from './clear-account.component'; | ||
|
||
describe('ClearAccountComponent', () => { | ||
let component: ClearAccountComponent; | ||
let fixture: ComponentFixture<ClearAccountComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ClearAccountComponent], | ||
}).compileComponents(); | ||
}); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(ClearAccountComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Component } from '@angular/core'; | ||
import { AccountService } from '../account.service'; | ||
import { GlobalVarsService } from '../global-vars.service'; | ||
|
||
@Component({ | ||
selector: 'app-clear-account', | ||
templateUrl: './clear-account.component.html', | ||
styleUrls: ['./clear-account.component.scss'], | ||
}) | ||
export class ClearAccountComponent { | ||
clearAccountCheck = ''; | ||
|
||
constructor( | ||
private accountService: AccountService, | ||
public globalVars: GlobalVarsService | ||
) {} | ||
|
||
clearAccounts(): void { | ||
const publicKeys = this.accountService.getPublicKeys(); | ||
for (const key of publicKeys) { | ||
this.accountService.deleteUser(key); | ||
} | ||
} | ||
|
||
clearAccountsCancel(): void { | ||
this.clearAccountCheck = ''; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.log-in-clear-data { | ||
text-decoration: underline; | ||
} | ||
|
||
.log-in-google, | ||
.log-in-seed, | ||
.sign-up-seed { | ||
height: 72px; | ||
width: 290px; | ||
background-size: 290px 72px; | ||
} | ||
|
||
.log-in-google { | ||
background-image: url(/assets/log_in_google.png); | ||
} | ||
|
||
.log-in-seed { | ||
background-image: url(/assets/log_in_seed.png); | ||
} | ||
|
||
.sign-up-seed { | ||
background-image: url(/assets/sign_up_seed.png); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. moved most of these over from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the verbiage here from
wipe
-->clear
since I felt like it reads and looks better. I can certainly change it back if we want to stick withwipe
, though.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "Clear" is a better choice here. Let's stick with your change.