mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-18 18:50:58 +03:00
All config values are now reloaded on config set
Added 4 new settings: user files folder, enable registration, enable downloads manager, and logging level selection
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { Component, OnInit, ViewChildren, QueryList, ElementRef } from '@angular/core';
|
||||
import { PostsService } from 'app/posts.services';
|
||||
import { trigger, transition, animateChild, stagger, query, style, animate } from '@angular/animations';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-downloads',
|
||||
@@ -40,13 +41,21 @@ export class DownloadsComponent implements OnInit {
|
||||
|
||||
valid_sessions_length = 0;
|
||||
|
||||
constructor(public postsService: PostsService) { }
|
||||
constructor(public postsService: PostsService, private router: Router) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.getCurrentDownloads();
|
||||
setInterval(() => {
|
||||
this.getCurrentDownloads();
|
||||
}, this.downloads_check_interval);
|
||||
|
||||
this.postsService.service_initialized.subscribe(init => {
|
||||
if (init) {
|
||||
if (!this.postsService.config['Extra']['enable_downloads_manager']) {
|
||||
this.router.navigate(['/home']);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
getCurrentDownloads() {
|
||||
|
||||
@@ -18,7 +18,7 @@ export class LoginComponent implements OnInit {
|
||||
loggingIn = false;
|
||||
|
||||
// registration
|
||||
registrationEnabled = true;
|
||||
registrationEnabled = false;
|
||||
registrationUsernameInput = '';
|
||||
registrationPasswordInput = '';
|
||||
registrationPasswordConfirmationInput = '';
|
||||
@@ -35,6 +35,7 @@ export class LoginComponent implements OnInit {
|
||||
if (!this.postsService.config['Advanced']['multi_user_mode']) {
|
||||
this.router.navigate(['/home']);
|
||||
}
|
||||
this.registrationEnabled = this.postsService.config['Users'] && this.postsService.config['Users']['allow_registration'];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div *ngIf="dataSource; else loading">
|
||||
<div style="padding: 15px">
|
||||
<div class="row">
|
||||
<div class="table table-responsive p-5">
|
||||
<div class="table table-responsive px-5 pb-4 pt-2">
|
||||
<div class="example-header">
|
||||
<mat-form-field>
|
||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Search">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.edit-role {
|
||||
position: relative;
|
||||
top: -80px;
|
||||
top: -50px;
|
||||
left: 35px;
|
||||
}
|
||||
Reference in New Issue
Block a user