mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-02 01:51:28 +03:00
About dialog now informs user when update is available or when they are up to date based on the github release api
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { PostsService } from 'app/posts.services';
|
||||
|
||||
@Component({
|
||||
selector: 'app-about-dialog',
|
||||
@@ -10,12 +11,23 @@ export class AboutDialogComponent implements OnInit {
|
||||
projectLink = 'https://github.com/Tzahi12345/YoutubeDL-Material';
|
||||
issuesLink = 'https://github.com/Tzahi12345/YoutubeDL-Material/issues';
|
||||
latestUpdateLink = 'https://github.com/Tzahi12345/YoutubeDL-Material/releases/latest'
|
||||
latestGithubRelease = null;
|
||||
checking_for_updates = true;
|
||||
|
||||
version = 'v3.5';
|
||||
current_version_tag = 'v3.5';
|
||||
|
||||
constructor() { }
|
||||
constructor(private postsService: PostsService) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.getLatestGithubRelease()
|
||||
}
|
||||
|
||||
getLatestGithubRelease() {
|
||||
this.postsService.getLatestGithubRelease().subscribe(res => {
|
||||
this.checking_for_updates = false;
|
||||
this.latestGithubRelease = res;
|
||||
console.log(this.latestGithubRelease)
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user