Browse Source

Improve usability

* Dialog height
* Always show permission selector
pull/3791/head
Thomas Kaul 11 months ago
parent
commit
7fc20818b2
  1. 3
      apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts
  2. 22
      apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.html
  3. 2
      apps/client/src/app/components/user-account-access/user-account-access.component.ts

3
apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts

@ -52,13 +52,12 @@ export class CreateOrUpdateAccessDialog implements OnDestroy {
if (accessType === 'PRIVATE') { if (accessType === 'PRIVATE') {
granteeUserIdControl.setValidators(Validators.required); granteeUserIdControl.setValidators(Validators.required);
permissionsControl.setValidators(Validators.required);
} else { } else {
granteeUserIdControl.clearValidators(); granteeUserIdControl.clearValidators();
permissionsControl.setValue(this.data.access.permissions[0]);
} }
granteeUserIdControl.updateValueAndValidity(); granteeUserIdControl.updateValueAndValidity();
permissionsControl.updateValueAndValidity();
this.changeDetectorRef.markForCheck(); this.changeDetectorRef.markForCheck();
}); });

22
apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.html

@ -27,18 +27,18 @@
</mat-form-field> </mat-form-field>
</div> </div>
@if (accessForm.get('type').value === 'PRIVATE') { <div>
<div> <mat-form-field appearance="outline" class="w-100">
<mat-form-field appearance="outline" class="w-100"> <mat-label i18n>Permission</mat-label>
<mat-label i18n>Permission</mat-label> <mat-select formControlName="permissions">
<mat-select formControlName="permissions"> <mat-option i18n value="READ_RESTRICTED">Restricted view</mat-option>
<mat-option i18n value="READ_RESTRICTED" @if (accessForm.get('type').value === 'PRIVATE') {
>Restricted view</mat-option
>
<mat-option i18n value="READ">View</mat-option> <mat-option i18n value="READ">View</mat-option>
</mat-select> }
</mat-form-field> </mat-select>
</div> </mat-form-field>
</div>
@if (accessForm.get('type').value === 'PRIVATE') {
<div> <div>
<mat-form-field appearance="outline" class="w-100"> <mat-form-field appearance="outline" class="w-100">
<mat-label> <mat-label>

2
apps/client/src/app/components/user-account-access/user-account-access.component.ts

@ -111,7 +111,7 @@ export class UserAccountAccessComponent implements OnDestroy, OnInit {
type: 'PRIVATE' type: 'PRIVATE'
} }
}, },
height: this.deviceType === 'mobile' ? '97.5vh' : '80vh', height: this.deviceType === 'mobile' ? '97.5vh' : undefined,
width: this.deviceType === 'mobile' ? '100vw' : '50rem' width: this.deviceType === 'mobile' ? '100vw' : '50rem'
}); });

Loading…
Cancel
Save