added jitsi api + improvements
This commit is contained in:
@@ -16,7 +16,7 @@ export class PermissionsComponent implements OnInit {
|
||||
constructor(private i18n: I18nService) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.datetimeformat = this.i18n.get('date-time-format', []);
|
||||
this.datetimeformat = this.i18n.get('format.datetime', []);
|
||||
}
|
||||
|
||||
sortData(sort: Sort) {
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
<mat-form-field>
|
||||
<input matInput type="text" min="3" [(ngModel)]="profileField.name" formControlName="name"
|
||||
placeholder="{{'profileField.name' | i18n}}">
|
||||
<mat-error>
|
||||
{{'profileField.error.name' | i18n}}
|
||||
</mat-error>
|
||||
<mat-error>
|
||||
{{'profileField.error.name' | i18n}}
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
@@ -29,27 +29,36 @@
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngSwitchCase="'DATE'">
|
||||
<input matInput [matDatepicker]="picker" [(ngModel)]="profileField.value" formControlName="value"
|
||||
<input matInput [matDatepicker]="datePicker" [(ngModel)]="profileField.value" formControlName="value"
|
||||
placeholder="{{'profileField.value' | i18n}}">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
<mat-datepicker-toggle matSuffix [for]="datePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #datePicker></mat-datepicker>
|
||||
<mat-error>
|
||||
{{'profileField.error.DATE' | i18n}}
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngSwitchCase="'DATETIME'">
|
||||
<input matInput [ngxMatDatetimePicker]="datetimePicker" [(ngModel)]="profileField.value" formControlName="value"
|
||||
placeholder="{{'profileField.value' | i18n}}">
|
||||
<mat-datepicker-toggle matSuffix [for]="datetimePicker"></mat-datepicker-toggle>
|
||||
<ngx-mat-datetime-picker #datetimePicker></ngx-mat-datetime-picker>
|
||||
<mat-error>
|
||||
{{'profileField.error.DATETIME' | i18n}}
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngSwitchCase="'URL'">
|
||||
<input matInput type="url" [(ngModel)]="profileField.value" formControlName="value"
|
||||
placeholder="{{'profileField.value' | i18n}}">
|
||||
<mat-error>
|
||||
{{'profileField.error.URL' | i18n}}
|
||||
</mat-error>
|
||||
<mat-error>
|
||||
{{'profileField.error.URL' | i18n}}
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngSwitchCase="'EMAIL'">
|
||||
<input matInput type="email" [(ngModel)]="profileField.value" formControlName="value"
|
||||
placeholder="{{'profileField.value' | i18n}}">
|
||||
<mat-error>
|
||||
{{'profileField.error.EMAIL' | i18n}}
|
||||
</mat-error>
|
||||
<mat-error>
|
||||
{{'profileField.error.EMAIL' | i18n}}
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-slide-toggle *ngSwitchCase="'BOOL'" (change)="booleanChange(profileField)"
|
||||
[checked]="profileField.value == 'true'">
|
||||
@@ -58,16 +67,16 @@
|
||||
<mat-form-field *ngSwitchCase="'NUMBER'">
|
||||
<input matInput type="number" [(ngModel)]="profileField.value" formControlName="value"
|
||||
placeholder="{{'profileField.value' | i18n}}">
|
||||
<mat-error>
|
||||
{{'profileField.error.NUMBER' | i18n}}
|
||||
</mat-error>
|
||||
<mat-error>
|
||||
{{'profileField.error.NUMBER' | i18n}}
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngSwitchCase="'BLOB'">
|
||||
<textarea matInput [(ngModel)]="profileField.blob" formControlName="blob"
|
||||
placeholder="{{'profileField.value' | i18n}}"></textarea>
|
||||
<mat-error>
|
||||
{{'profileField.error.BLOB' | i18n}}
|
||||
</mat-error>
|
||||
<mat-error>
|
||||
{{'profileField.error.BLOB' | i18n}}
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
@@ -81,7 +90,8 @@
|
||||
</mat-option>
|
||||
|
||||
<mat-select-trigger>
|
||||
<mat-icon inline="true">{{'visibility.' + profileField.visibility + '.icon' | i18n}}</mat-icon> {{'visibility.' +
|
||||
<mat-icon inline="true">{{'visibility.' + profileField.visibility + '.icon' | i18n}}</mat-icon>
|
||||
{{'visibility.' +
|
||||
profileField.visibility | i18n}}
|
||||
</mat-select-trigger>
|
||||
</mat-select>
|
||||
@@ -93,9 +103,9 @@
|
||||
<mat-form-field>
|
||||
<input matInput type="number" min="0" [(ngModel)]="profileField.index" formControlName="index"
|
||||
placeholder="{{'profileField.index' | i18n}}">
|
||||
<mat-error>
|
||||
{{'profileField.error.index' | i18n}}
|
||||
</mat-error>
|
||||
<mat-error>
|
||||
{{'profileField.error.index' | i18n}}
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
</form>
|
||||
</mat-dialog-content>
|
||||
|
||||
@@ -11,11 +11,14 @@
|
||||
<td mat-cell *matCellDef="let profileField">
|
||||
<div [ngSwitch]="profileField.type">
|
||||
<span *ngSwitchCase="'TEXT'">{{profileField.value}}</span>
|
||||
<span *ngSwitchCase="'DATE'">{{profileField.value | date:datetimeformat}}</span>
|
||||
<a *ngSwitchCase="'URL'" href="{{profileField.value}}">{{profileField.value}}</a>
|
||||
<a *ngSwitchCase="'EMAIL'" href="mailto:{{profileField.value}}">{{profileField.value}}</a>
|
||||
<span *ngSwitchCase="'DATE'">{{profileField.value | date:dateformat}}</span>
|
||||
<span *ngSwitchCase="'DATETIME'">{{profileField.value | date:datetimeformat}}</span>
|
||||
<span *ngSwitchCase="'TIME'">{{profileField.value | date:timeformat}}</span>
|
||||
<a *ngSwitchCase="'URL'" class="accent" href="{{profileField.value}}">{{profileField.value}}</a>
|
||||
<a *ngSwitchCase="'EMAIL'" class="accent"
|
||||
href="mailto:{{profileField.value}}">{{profileField.value}}</a>
|
||||
<span *ngSwitchCase="'NUMBER'">{{profileField.value}}</span>
|
||||
<button *ngSwitchCase="'BLOB'" mat-raised-button
|
||||
<button *ngSwitchCase="'BLOB'" mat-raised-buttonu
|
||||
(click)="openBlob(profileField)">{{'profileField.openBlob' | i18n}}</button>
|
||||
<mat-slide-toggle *ngSwitchCase="'BOOL'" [checked]="profileField.value == 'true'" disabled>
|
||||
</mat-slide-toggle>
|
||||
@@ -25,7 +28,9 @@
|
||||
|
||||
<ng-container matColumnDef="visibility" *ngIf="edit">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header="visibility"> {{'visibility' | i18n}} </th>
|
||||
<td mat-cell *matCellDef="let profileField"> <mat-icon inline="true">{{'visibility.' + profileField.visibility + '.icon' | i18n}}</mat-icon> {{'visibility.' + profileField.visibility | i18n}}
|
||||
<td mat-cell *matCellDef="let profileField">
|
||||
<mat-icon inline="true">{{'visibility.' + profileField.visibility + '.icon' | i18n}}</mat-icon>
|
||||
{{'visibility.' + profileField.visibility | i18n}}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -17,6 +17,9 @@ export class ProfileFieldsComponent implements OnInit {
|
||||
@Input() edit;
|
||||
profileFieldColumns = ["name", "value"];
|
||||
profileFields: Array<any> = [];
|
||||
datetimeformat: String;
|
||||
dateformat: String;
|
||||
timeformat: String;
|
||||
|
||||
constructor(private i18n: I18nService, private profileService: ProfileService, public dialog: MatDialog) {}
|
||||
|
||||
@@ -27,6 +30,11 @@ export class ProfileFieldsComponent implements OnInit {
|
||||
this.profileFieldColumns.push("delete");
|
||||
}
|
||||
this.update();
|
||||
|
||||
|
||||
this.dateformat = this.i18n.get('format.date', []);
|
||||
this.datetimeformat = this.i18n.get('format.datetime', []);
|
||||
this.timeformat = this.i18n.get('format.time', []);
|
||||
}
|
||||
|
||||
|
||||
@@ -140,7 +148,7 @@ export class ProfileFieldDialog {
|
||||
form: FormGroup;
|
||||
profileField;
|
||||
|
||||
types = ["TEXT", "NUMBER", "DATE", "URL", "EMAIL", "BOOL", "BLOB"];
|
||||
types = ["TEXT", "NUMBER", "DATE", "DATETIME", "URL", "EMAIL", "BOOL", "BLOB"];
|
||||
visibilities = ["PRIVATE", "PROTECTED", "PUBLIC"];
|
||||
|
||||
constructor(
|
||||
|
||||
Reference in New Issue
Block a user