mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-22 04:30:56 +03:00
Fixed broken translations for snackbars
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { PostsService } from 'app/posts.services';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { UpdaterStatus } from '../../../api-types';
|
||||
|
||||
@Component({
|
||||
@@ -14,7 +13,7 @@ export class UpdateProgressDialogComponent implements OnInit {
|
||||
updateInterval = 250;
|
||||
errored = false;
|
||||
|
||||
constructor(private postsService: PostsService, private snackBar: MatSnackBar) { }
|
||||
constructor(private postsService: PostsService) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.getUpdateProgress();
|
||||
@@ -28,16 +27,9 @@ export class UpdateProgressDialogComponent implements OnInit {
|
||||
if (res) {
|
||||
this.updateStatus = res;
|
||||
if (this.updateStatus && this.updateStatus['error']) {
|
||||
this.openSnackBar('Update failed. Check logs for more details.');
|
||||
this.postsService.openSnackBar($localize`Update failed. Check logs for more details.`);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public openSnackBar(message: string, action: string = '') {
|
||||
this.snackBar.open(message, action, {
|
||||
duration: 2000,
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user