mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-21 08:03:20 +03:00
implemented allowSubscriptions in frontend
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<mat-toolbar color="primary" class="top">
|
<mat-toolbar color="primary" class="top">
|
||||||
<div class="flex-row" width="100%" height="100%">
|
<div class="flex-row" width="100%" height="100%">
|
||||||
<div class="flex-column" style="text-align: left; margin-top: 1px;">
|
<div class="flex-column" style="text-align: left; margin-top: 1px;">
|
||||||
<button #hamburgerMenu style="outline: none" *ngIf="router.url.split(';')[0] !== '/player'" mat-icon-button aria-label="Toggle side navigation" (click)="toggleSidenav()"><mat-icon>menu</mat-icon></button>
|
<button #hamburgerMenu style="outline: none" *ngIf="router.url.split(';')[0] !== '/player' && allowSubscriptions" mat-icon-button aria-label="Toggle side navigation" (click)="toggleSidenav()"><mat-icon>menu</mat-icon></button>
|
||||||
<button (click)="goBack()" *ngIf="router.url.split(';')[0] === '/player'" mat-icon-button><mat-icon>arrow_back</mat-icon></button>
|
<button (click)="goBack()" *ngIf="router.url.split(';')[0] === '/player'" mat-icon-button><mat-icon>arrow_back</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-column" style="text-align: center; margin-top: 5px;">
|
<div class="flex-column" style="text-align: center; margin-top: 5px;">
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ export class AppComponent implements OnInit {
|
|||||||
topBarTitle = 'Youtube Downloader';
|
topBarTitle = 'Youtube Downloader';
|
||||||
defaultTheme = null;
|
defaultTheme = null;
|
||||||
allowThemeChange = null;
|
allowThemeChange = null;
|
||||||
|
allowSubscriptions = false;
|
||||||
|
|
||||||
@ViewChild('sidenav', {static: false}) sidenav: MatSidenav;
|
@ViewChild('sidenav', {static: false}) sidenav: MatSidenav;
|
||||||
@ViewChild('hamburgerMenu', {static: false, read: ElementRef}) hamburgerMenuButton: ElementRef;
|
@ViewChild('hamburgerMenu', {static: false, read: ElementRef}) hamburgerMenuButton: ElementRef;
|
||||||
@@ -61,6 +62,7 @@ export class AppComponent implements OnInit {
|
|||||||
const themingExists = result['YoutubeDLMaterial']['Themes'];
|
const themingExists = result['YoutubeDLMaterial']['Themes'];
|
||||||
this.defaultTheme = themingExists ? result['YoutubeDLMaterial']['Themes']['default_theme'] : 'default';
|
this.defaultTheme = themingExists ? result['YoutubeDLMaterial']['Themes']['default_theme'] : 'default';
|
||||||
this.allowThemeChange = themingExists ? result['YoutubeDLMaterial']['Themes']['allow_theme_change'] : true;
|
this.allowThemeChange = themingExists ? result['YoutubeDLMaterial']['Themes']['allow_theme_change'] : true;
|
||||||
|
this.allowSubscriptions = result['YoutubeDLMaterial']['Subscriptions']['allow_subscriptions'];
|
||||||
|
|
||||||
// sets theme to config default if it doesn't exist
|
// sets theme to config default if it doesn't exist
|
||||||
if (!localStorage.getItem('theme')) {
|
if (!localStorage.getItem('theme')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user