This commit is contained in:
Dan Percic 2023-08-30 10:10:36 +03:00
parent 45622e7fd6
commit f140f1fc16
17 changed files with 66 additions and 22 deletions

View File

@ -160,7 +160,9 @@ section.settings {
box-sizing: border-box;
background: var(--iqser-background);
overflow: hidden;
transition: width ease-in-out 0.2s, min-width ease-in-out 0.2s;
transition:
width ease-in-out 0.2s,
min-width ease-in-out 0.2s;
&:hover {
overflow-y: auto;

View File

@ -7,18 +7,26 @@
0%,
20% {
color: rgba(var(--iqser-accent-rgb), 0);
text-shadow: 0.25em 0 0 rgba(var(--iqser-accent-rgb), 0), 0.5em 0 0 rgba(var(--iqser-accent-rgb), 0);
text-shadow:
0.25em 0 0 rgba(var(--iqser-accent-rgb), 0),
0.5em 0 0 rgba(var(--iqser-accent-rgb), 0);
}
40% {
color: var(--iqser-accent);
text-shadow: 0.25em 0 0 rgba(var(--iqser-accent-rgb), 0), 0.5em 0 0 rgba(var(--iqser-accent-rgb), 0);
text-shadow:
0.25em 0 0 rgba(var(--iqser-accent-rgb), 0),
0.5em 0 0 rgba(var(--iqser-accent-rgb), 0);
}
60% {
text-shadow: 0.25em 0 0 var(--iqser-accent), 0.5em 0 0 rgba(var(--iqser-accent-rgb), 0);
text-shadow:
0.25em 0 0 var(--iqser-accent),
0.5em 0 0 rgba(var(--iqser-accent-rgb), 0);
}
80%,
100% {
text-shadow: 0.25em 0 0 var(--iqser-accent), 0.5em 0 0 var(--iqser-accent);
text-shadow:
0.25em 0 0 var(--iqser-accent),
0.5em 0 0 var(--iqser-accent);
}
}

View File

@ -30,7 +30,10 @@ export abstract class BaseDialogComponent implements AfterViewInit, OnDestroy {
readonly #dialog = inject(MatDialog);
#hasErrors = false;
protected constructor(protected readonly _dialogRef: MatDialogRef<BaseDialogComponent>, private readonly _isInEditMode = false) {}
protected constructor(
protected readonly _dialogRef: MatDialogRef<BaseDialogComponent>,
private readonly _isInEditMode = false,
) {}
get valid(): boolean {
return !this.form || this.form.valid;

View File

@ -20,7 +20,7 @@
<div *ngIf="config.checkboxes.length > 0" class="mt-24 checkboxes-wrapper">
<ng-container *ngFor="let checkbox of config.checkboxes">
<mat-checkbox [(ngModel)]="checkbox.value" [class.error]="!checkbox.value && showToast" color="primary">
{{ checkbox.label | translate : config.translateParams }}
{{ checkbox.label | translate: config.translateParams }}
</mat-checkbox>
<ng-container *ngTemplateOutlet="checkbox.extraContent; context: { data: checkbox.extraContentData }"></ng-container>
</ng-container>

View File

@ -7,7 +7,10 @@ import { ChangeDetectorRef, Directive, ElementRef, HostBinding, HostListener, On
export class HasScrollbarDirective implements OnInit, OnChanges {
@HostBinding('class') class = '';
constructor(protected readonly _elementRef: ElementRef, protected readonly _changeDetector: ChangeDetectorRef) {}
constructor(
protected readonly _elementRef: ElementRef,
protected readonly _changeDetector: ChangeDetectorRef,
) {}
get hasScrollbar() {
const element = this._elementRef?.nativeElement as HTMLElement;

View File

@ -13,7 +13,10 @@ import { CircleButtonTypes } from '../../buttons';
export class HelpModeComponent {
readonly circleButtonTypes = CircleButtonTypes;
constructor(private readonly _dialog: MatDialog, readonly helpModeService: HelpModeService) {}
constructor(
private readonly _dialog: MatDialog,
readonly helpModeService: HelpModeService,
) {}
@HostListener('document:keydown.escape', ['$event'])
onEscKeydownHandler(event: KeyboardEvent): void {

View File

@ -14,8 +14,8 @@
<mat-icon [svgIcon]="option.icon" class="icon"></mat-icon>
<div class="text">
<label class="details-radio-label pointer">{{ option.label | translate : option.descriptionParams }}</label>
<span class="hint">{{ option.description | translate : option.descriptionParams | replaceNbsp }}</span>
<label class="details-radio-label pointer">{{ option.label | translate: option.descriptionParams }}</label>
<span class="hint">{{ option.description | translate: option.descriptionParams | replaceNbsp }}</span>
<div *ngIf="option.extraOption && !option.extraOption.hidden && isSelected(option)" class="iqser-input-group">
<mat-checkbox

View File

@ -34,7 +34,10 @@ export class PageHeaderComponent<T extends IListable> {
readonly filters$ = this.filterService?.filterGroups$.pipe(filterEach(f => !!f.icon));
readonly showResetFilters$ = this.#showResetFilters$;
constructor(@Optional() readonly filterService: FilterService, @Optional() readonly searchService: SearchService<T>) {}
constructor(
@Optional() readonly filterService: FilterService,
@Optional() readonly searchService: SearchService<T>,
) {}
get filterHelpModeKey() {
return this.helpModeKey ? `filter_${this.helpModeKey}_list` : '';

View File

@ -9,7 +9,7 @@
></iqser-round-checkbox>
<span class="all-caps-label">
{{ tableHeaderLabel | translate : { length: totalSize || (listingService.displayedLength$ | async) } }}
{{ tableHeaderLabel | translate: { length: totalSize || (listingService.displayedLength$ | async) } }}
</span>
</div>

View File

@ -44,7 +44,10 @@ export class ColumnHeaderComponent<T extends IListable, K extends string> extend
@ViewChild('bulkActionsContainer') bulkActionsContainer?: ElementRef;
constructor(readonly listingService: ListingService<T>, private readonly _changeRef: ChangeDetectorRef) {
constructor(
readonly listingService: ListingService<T>,
private readonly _changeRef: ChangeDetectorRef,
) {
super();
}

View File

@ -116,7 +116,9 @@
.item,
.add-btn {
transition: background-color 0.2s, box-shadow 0.2s;
transition:
background-color 0.2s,
box-shadow 0.2s;
border-radius: 8px;
margin: 0 8px 4px 8px;

View File

@ -8,7 +8,11 @@ interface T {
}
export class PruningTranslationLoader implements TranslateLoader {
constructor(private readonly _http: HttpClient, private readonly _prefix: string, private readonly _suffix: string) {}
constructor(
private readonly _http: HttpClient,
private readonly _prefix: string,
private readonly _suffix: string,
) {}
getTranslation(lang: string): Observable<T> {
return this._http.get(`${this._prefix}${lang}${this._suffix}`).pipe(map(result => this._process(result as T)));

View File

@ -1,10 +1,10 @@
<div *ngIf="_user && _user | name : namePipeOptions as userName" class="wrapper">
<div *ngIf="_user && _user | name: namePipeOptions as userName" class="wrapper">
<div
[className]="colorClass + ' oval ' + size + (hasBorder ? ' border' : '')"
[matTooltipPosition]="tooltipPosition"
[matTooltip]="showTooltip ? userName : ''"
>
{{ _user | name : { showInitials: true } }}
{{ _user | name: { showInitials: true } }}
</div>
<div *ngIf="withName" [class.disabled]="disabled" class="clamp-1 username" id="avatarUsername">

View File

@ -24,7 +24,10 @@ export class InitialsAvatarComponent<Interface extends IIqserUser = IIqserUser,
colorClass?: string;
namePipeOptions?: NamePipeOptions;
constructor(private readonly _userService: IqserUserService<Interface, Class>, private readonly _translateService: TranslateService) {}
constructor(
private readonly _userService: IqserUserService<Interface, Class>,
private readonly _translateService: TranslateService,
) {}
_user?: Class;

View File

@ -8,7 +8,10 @@ import { KeycloakLoginOptions } from 'keycloak-js';
export class IqserAuthGuard extends KeycloakAuthGuard {
readonly #config = getConfig();
constructor(protected readonly _router: Router, protected readonly _keycloak: KeycloakService) {
constructor(
protected readonly _router: Router,
protected readonly _keycloak: KeycloakService,
) {
super(_router, _keycloak);
}

View File

@ -16,7 +16,11 @@ export class IqserUser implements IIqserUser, IListable {
constructor(user: KeycloakProfile | IIqserUser, ...args: unknown[]);
constructor(user: KeycloakProfile | IIqserUser, readonly roles: List, readonly userId: string) {
constructor(
user: KeycloakProfile | IIqserUser,
readonly roles: List,
readonly userId: string,
) {
this.hasAnyRole = this.roles.length > 0;
this.email = user.email;
this.username = user.username ?? this.email ?? 'unknown user';

View File

@ -26,7 +26,10 @@ export class NamePipe implements PipeTransform {
showInitials: false,
};
constructor(private readonly _userService: IqserUserService, private readonly _translateService: TranslateService) {}
constructor(
private readonly _userService: IqserUserService,
private readonly _translateService: TranslateService,
) {}
transform(value: IqserUser | string, options: NamePipeOptions = this._defaultOptions): string {
if (!value || value === 'undefined') {