Tab title now matches the top title set in the settings

This commit is contained in:
Isaac Abadi
2020-11-20 17:39:38 -05:00
parent b059c7ed5e
commit b32fdb2445

View File

@@ -12,6 +12,7 @@ import { v4 as uuid } from 'uuid';
import { MatSnackBar } from '@angular/material/snack-bar'; import { MatSnackBar } from '@angular/material/snack-bar';
import * as Fingerprint2 from 'fingerprintjs2'; import * as Fingerprint2 from 'fingerprintjs2';
import { isoLangs } from './settings/locales_list'; import { isoLangs } from './settings/locales_list';
import { Title } from '@angular/platform-browser';
@Injectable() @Injectable()
export class PostsService implements CanActivate { export class PostsService implements CanActivate {
@@ -58,7 +59,7 @@ export class PostsService implements CanActivate {
locale = isoLangs['en']; locale = isoLangs['en'];
constructor(private http: HttpClient, private router: Router, @Inject(DOCUMENT) private document: Document, constructor(private http: HttpClient, private router: Router, @Inject(DOCUMENT) private document: Document,
public snackBar: MatSnackBar) { public snackBar: MatSnackBar, private titleService: Title) {
console.log('PostsService Initialized...'); console.log('PostsService Initialized...');
this.path = this.document.location.origin + '/api/'; this.path = this.document.location.origin + '/api/';
@@ -88,6 +89,7 @@ export class PostsService implements CanActivate {
const result = !this.debugMode ? res['config_file'] : res; const result = !this.debugMode ? res['config_file'] : res;
if (result) { if (result) {
this.config = result['YoutubeDLMaterial']; this.config = result['YoutubeDLMaterial'];
this.titleService.setTitle(this.config['Extra']['title_top']);
if (this.config['Advanced']['multi_user_mode']) { if (this.config['Advanced']['multi_user_mode']) {
this.checkAdminCreationStatus(); this.checkAdminCreationStatus();
// login stuff // login stuff