mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-23 05:00:54 +03:00
Added UI flow for creating default admin account. Dialog will show up after enabling or in the login menu if the admin account isn't present
This commit is contained in:
@@ -63,6 +63,10 @@ export class SettingsComponent implements OnInit {
|
||||
const settingsToSave = {'YoutubeDLMaterial': this.new_config};
|
||||
this.postsService.setConfig(settingsToSave).subscribe(res => {
|
||||
if (res['success']) {
|
||||
if (!this.initial_config['Advanced']['multi_user_mode'] && this.new_config['Advanced']['multi_user_mode']) {
|
||||
// multi user mode was enabled, let's check if default admin account exists
|
||||
this.postsService.checkAdminCreationStatus();
|
||||
}
|
||||
// sets new config as old config
|
||||
this.initial_config = JSON.parse(JSON.stringify(this.new_config));
|
||||
this.postsService.reload_config.next(true);
|
||||
|
||||
Reference in New Issue
Block a user