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:
Tzahi12345
2020-04-30 16:31:36 -04:00
parent e5f9694da0
commit e7b841c056
11 changed files with 163 additions and 2 deletions

View File

@@ -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);