mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-24 21:50:59 +03:00
Added progress bar to file downloads
Added two new API calls, to update the server to a particular version and to get the updater status You can now update through the UI, and a status dialog displays after
This commit is contained in:
@@ -6,6 +6,7 @@ import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import {DomSanitizer} from '@angular/platform-browser';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ArgModifierDialogComponent } from 'app/dialogs/arg-modifier-dialog/arg-modifier-dialog.component';
|
||||
import { CURRENT_VERSION } from 'app/consts';
|
||||
|
||||
@Component({
|
||||
selector: 'app-settings',
|
||||
@@ -24,6 +25,9 @@ export class SettingsComponent implements OnInit {
|
||||
|
||||
_settingsSame = true;
|
||||
|
||||
latestGithubRelease = null;
|
||||
CURRENT_VERSION = CURRENT_VERSION
|
||||
|
||||
get settingsAreTheSame() {
|
||||
this._settingsSame = this.settingsSame()
|
||||
return this._settingsSame;
|
||||
@@ -40,6 +44,8 @@ export class SettingsComponent implements OnInit {
|
||||
this.getConfig();
|
||||
|
||||
this.generated_bookmarklet_code = this.sanitizer.bypassSecurityTrustUrl(this.generateBookmarkletCode());
|
||||
|
||||
this.getLatestGithubRelease();
|
||||
}
|
||||
|
||||
getConfig() {
|
||||
@@ -129,6 +135,12 @@ export class SettingsComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
getLatestGithubRelease() {
|
||||
this.postsService.getLatestGithubRelease().subscribe(res => {
|
||||
this.latestGithubRelease = res;
|
||||
});
|
||||
}
|
||||
|
||||
// snackbar helper
|
||||
public openSnackBar(message: string, action: string = '') {
|
||||
this.snackBar.open(message, action, {
|
||||
|
||||
Reference in New Issue
Block a user