Enabled strict template mode in Angular

Code cleanup
This commit is contained in:
Tzahi12345
2023-01-29 15:51:50 -05:00
parent e82066b2cd
commit 6010d991fb
21 changed files with 61 additions and 49 deletions

View File

@@ -521,7 +521,7 @@
</div>
<mat-divider></mat-divider>
<mat-form-field style="margin-top: 15px;">
<mat-input i18n="Auth method">Auth method</mat-input>
<mat-label i18n="Auth method">Auth method</mat-label>
<mat-select [(ngModel)]="new_config['Users']['auth_method']">
<mat-option value="internal">
<ng-container i18n="Internal auth method">Internal</ng-container>
@@ -534,31 +534,31 @@
<div *ngIf="new_config['Users']['auth_method'] === 'ldap'">
<div>
<mat-form-field>
<mat-input i18n="LDAP URL">LDAP URL</mat-input>
<mat-label i18n="LDAP URL">LDAP URL</mat-label>
<input matInput [(ngModel)]="new_config['Users']['ldap_config']['url']">
</mat-form-field>
</div>
<div>
<mat-form-field>
<mat-input i18n="Bind DN">Bind DN</mat-input>
<mat-label i18n="Bind DN">Bind DN</mat-label>
<input matInput [(ngModel)]="new_config['Users']['ldap_config']['bindDN']">
</mat-form-field>
</div>
<div>
<mat-form-field>
<mat-input i18n="Bind Credentials">Bind Credentials</mat-input>
<mat-label i18n="Bind Credentials">Bind Credentials</mat-label>
<input matInput [(ngModel)]="new_config['Users']['ldap_config']['bindCredentials']">
</mat-form-field>
</div>
<div>
<mat-form-field>
<mat-input i18n="Search Base">Search Base</mat-input>
<mat-label i18n="Search Base">Search Base</mat-label>
<input matInput [(ngModel)]="new_config['Users']['ldap_config']['searchBase']">
</mat-form-field>
</div>
<div>
<mat-form-field>
<mat-input i18n="Search Filter">Search Filter</mat-input>
<mat-label i18n="Search Filter">Search Filter</mat-label>
<input matInput [(ngModel)]="new_config['Users']['ldap_config']['searchFilter']">
</mat-form-field>
</div>

View File

@@ -13,7 +13,7 @@ import { moveItemInArray, CdkDragDrop } from '@angular/cdk/drag-drop';
import { InputDialogComponent } from 'app/input-dialog/input-dialog.component';
import { EditCategoryDialogComponent } from 'app/dialogs/edit-category-dialog/edit-category-dialog.component';
import { ActivatedRoute, Router } from '@angular/router';
import { Category } from 'api-types';
import { Category, DBInfoResponse } from 'api-types';
import { GenerateRssUrlComponent } from 'app/dialogs/generate-rss-url/generate-rss-url.component';
@Component({
@@ -32,7 +32,7 @@ export class SettingsComponent implements OnInit {
generated_bookmarklet_code = null;
bookmarkletAudioOnly = false;
db_info = null;
db_info: DBInfoResponse = null;
db_transferring = false;
testing_connection_string = false;
@@ -315,7 +315,7 @@ export class SettingsComponent implements OnInit {
getDBInfo(): void {
this.postsService.getDBInfo().subscribe(res => {
this.db_info = res['db_info'];
this.db_info = res;
});
}