mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-06 20:01:27 +03:00
Added ability to set a pin for settings menu
This commit is contained in:
22
src/app/dialogs/set-pin-dialog/set-pin-dialog.component.ts
Normal file
22
src/app/dialogs/set-pin-dialog/set-pin-dialog.component.ts
Normal 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!`);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user