@@ -56,7 +56,7 @@ export class AddSongComponent {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
});
|
||||
|
||||
const filterValue = this.debouncedFilterValue;
|
||||
return filterValue ? searchSongs(songs, filterValue) : songs;
|
||||
|
||||
+1
-3
@@ -29,9 +29,7 @@ export class FilterComponent {
|
||||
this.filterStore.updateSongFilter({q: this.value});
|
||||
});
|
||||
|
||||
this.valueChanged$
|
||||
.pipe(debounceTime(100), distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))
|
||||
.subscribe(text => void this.applyValueChange(text));
|
||||
this.valueChanged$.pipe(debounceTime(100), distinctUntilChanged(), takeUntilDestroyed(this.destroyRef)).subscribe(text => void this.applyValueChange(text));
|
||||
}
|
||||
|
||||
public valueChange(text: string): void {
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
@if (sections && !fullscreen) {
|
||||
<div (click)="onClick()" [class.chords]="iChordMode !== 'hide'" class="song-text">
|
||||
<div
|
||||
(click)="onClick()"
|
||||
(keydown.enter)="onClick()"
|
||||
(keydown.space)="onClick()"
|
||||
[class.chords]="iChordMode !== 'hide'"
|
||||
class="song-text"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@if (showSwitch) {
|
||||
<button (click)="onChordClick()" class="menu" mat-icon-button>
|
||||
<fa-icon [icon]="faLines"></fa-icon>
|
||||
@@ -23,7 +31,16 @@
|
||||
<ng-content></ng-content>
|
||||
</div>
|
||||
} @if (sections && fullscreen) {
|
||||
<div (click)="onClick()" [@songSwitch]="sections" [class.chords]="iChordMode !== 'hide'" class="song-text">
|
||||
<div
|
||||
(click)="onClick()"
|
||||
(keydown.enter)="onClick()"
|
||||
(keydown.space)="onClick()"
|
||||
[@songSwitch]="sections"
|
||||
[class.chords]="iChordMode !== 'hide'"
|
||||
class="song-text"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@if (showSwitch) {
|
||||
<button (click)="onChordClick()" class="menu" mat-icon-button>
|
||||
<fa-icon [icon]="faLines"></fa-icon>
|
||||
|
||||
@@ -31,9 +31,7 @@ describe('RoleGuard', () => {
|
||||
});
|
||||
|
||||
it('should deny access when there is no current user', async () => {
|
||||
await expectAsync(firstValueFrom(guard.canActivate({data: {requiredRoles: ['leader']}} as never))).toBeResolvedTo(
|
||||
{commands: ['brand', 'new-user']} as never
|
||||
);
|
||||
await expectAsync(firstValueFrom(guard.canActivate({data: {requiredRoles: ['leader']}} as never))).toBeResolvedTo({commands: ['brand', 'new-user']} as never);
|
||||
});
|
||||
|
||||
it('should allow admins regardless of requiredRoles', async () => {
|
||||
|
||||
Reference in New Issue
Block a user