Added ability to set a pin for settings menu

This commit is contained in:
Tzahi12345
2023-04-27 21:37:32 -04:00
parent f973426bd2
commit 010f0fbb1c
150 changed files with 482 additions and 152 deletions

View File

@@ -0,0 +1,22 @@
import { Component } from '@angular/core';
import { PostsService } from 'app/posts.services';
@Component({
selector: 'app-set-pin-dialog',
templateUrl: './set-pin-dialog.component.html',
styleUrls: ['./set-pin-dialog.component.scss']
})
export class SetPinDialogComponent {
pin: string;
constructor(private postsService: PostsService) {
}
setPin() {
this.postsService.setPin(this.pin).subscribe(res => {
if (res['success']) {
this.postsService.openSnackBar($localize`Successfully set pin!`);
}
});
}
}