added ability to set pin for settings. pin is md5'd by the backend

This commit is contained in:
Isaac Grynsztein
2020-03-13 02:20:07 -04:00
parent c752b13732
commit 91f6dbcb5b
16 changed files with 296 additions and 47 deletions

View File

@@ -1,5 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { PostsService } from 'app/posts.services';
import { MatDialog } from '@angular/material';
import { CheckOrSetPinDialogComponent } from 'app/dialogs/check-or-set-pin-dialog/check-or-set-pin-dialog.component';
@Component({
selector: 'app-settings',
@@ -12,7 +14,7 @@ export class SettingsComponent implements OnInit {
new_config = null
loading_config = false;
constructor(private postsService: PostsService) { }
constructor(private postsService: PostsService, private dialog: MatDialog) { }
ngOnInit() {
this.getConfig();
@@ -46,4 +48,12 @@ export class SettingsComponent implements OnInit {
})
}
setNewPin() {
const dialogRef = this.dialog.open(CheckOrSetPinDialogComponent, {
data: {
resetMode: true
}
});
}
}