Auto-formatted every file to keep everything consistent.
This commit is contained in:
@ -1,17 +1,18 @@
|
||||
<mat-form-field>
|
||||
<mat-label>Group</mat-label>
|
||||
<input
|
||||
matInput
|
||||
type="text"
|
||||
placeholder="Pick a group"
|
||||
aria-label="group"
|
||||
[formControl]="formControl"
|
||||
[matAutocomplete]="auto"
|
||||
[disabled]="!!groupDisabled"
|
||||
[readonly]="!!groupDisabled"
|
||||
(blur)="blur()"
|
||||
(input)="input()">
|
||||
<mat-autocomplete #auto="matAutocomplete" [displayWith]="displayFn" (optionSelected)="select($event.option.value)">
|
||||
<input matInput
|
||||
type="text"
|
||||
placeholder="Pick a group"
|
||||
aria-label="group"
|
||||
[formControl]="formControl"
|
||||
[matAutocomplete]="auto"
|
||||
[disabled]="!!groupDisabled"
|
||||
[readonly]="!!groupDisabled"
|
||||
(blur)="blur()"
|
||||
(input)="input()">
|
||||
<mat-autocomplete #auto="matAutocomplete"
|
||||
[displayWith]="displayFn"
|
||||
(optionSelected)="select($event.option.value)">
|
||||
@for (group of filteredGroups; track group.id) {
|
||||
<mat-option [value]="group">{{group.name}}</mat-option>
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ describe('GroupDropdownComponent', () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [GroupDropdownComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(GroupDropdownComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
@ -35,7 +35,7 @@ export class GroupDropdownComponent implements OnInit {
|
||||
this.route.data.subscribe(data => {
|
||||
if (!data['groups'])
|
||||
return;
|
||||
|
||||
|
||||
this.groups = data['groups'];
|
||||
});
|
||||
|
||||
@ -83,13 +83,13 @@ export class GroupDropdownComponent implements OnInit {
|
||||
} else if (insenstiveGroups.length == 1) {
|
||||
newValue = insenstiveGroups[0];
|
||||
}
|
||||
|
||||
|
||||
if (newValue) {
|
||||
this.formControl.setValue(newValue);
|
||||
//this.groupChange.emit(newValue.name);
|
||||
} else if (!newValue)
|
||||
this.formControl.setValue(undefined);
|
||||
//this.groupChange.emit(undefined);
|
||||
//this.groupChange.emit(undefined);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,10 @@
|
||||
<mat-card-content>
|
||||
<mat-form-field>
|
||||
<mat-label>Group Name</mat-label>
|
||||
<input matInput type="text" [formControl]="nameForm" [disabled]="isSpecial" />
|
||||
<input matInput
|
||||
type="text"
|
||||
[formControl]="nameForm"
|
||||
[disabled]="isSpecial" />
|
||||
@if (nameForm.invalid && (nameForm.dirty || nameForm.touched)) {
|
||||
@if (nameForm.hasError('required')) {
|
||||
<small class="error">This field is required.</small>
|
||||
@ -16,7 +19,9 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>TTS Priority</mat-label>
|
||||
<input matInput type="number" [formControl]="priorityForm" />
|
||||
<input matInput
|
||||
type="number"
|
||||
[formControl]="priorityForm" />
|
||||
@if (priorityForm.invalid && (priorityForm.dirty || priorityForm.touched)) {
|
||||
@if (priorityForm.hasError('required')) {
|
||||
<small class="error">This field is required.</small>
|
||||
@ -34,16 +39,14 @@
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button
|
||||
mat-button
|
||||
[disabled]="waitForResponse || formGroup.invalid"
|
||||
(click)="add()">
|
||||
<button mat-button
|
||||
[disabled]="waitForResponse || formGroup.invalid"
|
||||
(click)="add()">
|
||||
<mat-icon>add</mat-icon>Add
|
||||
</button>
|
||||
<button
|
||||
mat-button
|
||||
[disabled]="waitForResponse"
|
||||
(click)="cancel()">
|
||||
<button mat-button
|
||||
[disabled]="waitForResponse"
|
||||
(click)="cancel()">
|
||||
<mat-icon>cancel</mat-icon>Cancel
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
|
@ -10,7 +10,7 @@ describe('GroupItemEditComponent', () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [GroupItemEditComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(GroupItemEditComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
@ -14,7 +14,8 @@
|
||||
<small class="muted block">polic{{item().chatters.length == 1 ? 'y' : 'ies'}}</small>
|
||||
</section>
|
||||
<section>
|
||||
<button mat-button (click)="router.navigate([link])">
|
||||
<button mat-button
|
||||
(click)="router.navigate([link])">
|
||||
<mat-icon>pageview</mat-icon>View
|
||||
</button>
|
||||
</section>
|
||||
|
@ -10,7 +10,7 @@ describe('GroupItemComponent', () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [GroupItemComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(GroupItemComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
@ -25,7 +25,7 @@ export class GroupItemComponent implements OnInit {
|
||||
item = input.required<{ group: Group, chatters: GroupChatter[], policies: Policy[] }>();
|
||||
link: string = '';
|
||||
|
||||
|
||||
|
||||
special: boolean = true;
|
||||
|
||||
ngOnInit() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<ul>
|
||||
@for (group of groups; track $index) {
|
||||
@for (group of groups; track $index) {
|
||||
<li>
|
||||
<group-item [item]="group" />
|
||||
</li>
|
||||
}
|
||||
}
|
||||
</ul>
|
@ -10,7 +10,7 @@ describe('GroupListComponent', () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [GroupListComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(GroupListComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
@ -8,7 +8,10 @@
|
||||
{{policies.length}} polic{{policies.length == 1 ? 'y' : 'ies'}}
|
||||
</mat-panel-description>
|
||||
</mat-expansion-panel-header>
|
||||
<policy-add-button class="add" [groups]="groups" [policies]="policies" [group]="group?.id" />
|
||||
<policy-add-button class="add"
|
||||
[groups]="groups"
|
||||
[policies]="policies"
|
||||
[group]="group?.id" />
|
||||
@if (policies.length > 0) {
|
||||
<policy-table [policies]="policies" />
|
||||
}
|
||||
@ -28,7 +31,9 @@
|
||||
<p>Deleting this group will delete everything that is part of it, including policies and permissions.</p>
|
||||
</article>
|
||||
<article class="right">
|
||||
<button mat-raised-button class="delete" (click)="delete()">
|
||||
<button mat-raised-button
|
||||
class="delete"
|
||||
(click)="delete()">
|
||||
<mat-icon>delete</mat-icon>Delete this group.
|
||||
</button>
|
||||
</article>
|
||||
|
@ -1,4 +1,4 @@
|
||||
.mat-expansion-panel ~ .mat-expansion-panel {
|
||||
.mat-expansion-panel~.mat-expansion-panel {
|
||||
margin-top: 4em;
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ describe('GroupPageComponent', () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [GroupPageComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(GroupPageComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
@ -1,15 +1,21 @@
|
||||
<button mat-button [mat-menu-trigger-for]="menu">
|
||||
<button mat-button
|
||||
[mat-menu-trigger-for]="menu">
|
||||
<mat-icon>add</mat-icon>
|
||||
Add a group
|
||||
</button>
|
||||
<mat-menu #menu="matMenu">
|
||||
<button mat-menu-item (click)="openDialog('')">Custom Group</button>
|
||||
<button mat-menu-item (click)="openDialog('everyone')">Everyone Group</button>
|
||||
<button mat-menu-item (click)="openDialog('subscribers')">Subscriber Group</button>
|
||||
<button mat-menu-item (click)="openDialog('moderators')">Moderator Group</button>
|
||||
<button mat-menu-item (click)="openDialog('vip')">VIP Group</button>
|
||||
<button mat-menu-item (click)="openDialog('broadcaster')">Broadcaster Group</button>
|
||||
<button mat-menu-item
|
||||
(click)="openDialog('')">Custom Group</button>
|
||||
<button mat-menu-item
|
||||
(click)="openDialog('everyone')">Everyone Group</button>
|
||||
<button mat-menu-item
|
||||
(click)="openDialog('subscribers')">Subscriber Group</button>
|
||||
<button mat-menu-item
|
||||
(click)="openDialog('moderators')">Moderator Group</button>
|
||||
<button mat-menu-item
|
||||
(click)="openDialog('vip')">VIP Group</button>
|
||||
<button mat-menu-item
|
||||
(click)="openDialog('broadcaster')">Broadcaster Group</button>
|
||||
</mat-menu>
|
||||
<group-list
|
||||
class="groups"
|
||||
[groups]="items" />
|
||||
<group-list class="groups"
|
||||
[groups]="items" />
|
@ -10,7 +10,7 @@ describe('GroupsComponent', () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [GroupsComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(GroupsComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
Reference in New Issue
Block a user