Fix linting errors

pull/9636/head
Benjamin Bädorf 3 years ago
parent c439e11eb3
commit 8aa250dbd3
No known key found for this signature in database
GPG Key ID: 069CA2D117AB5CCF
  1. 5
      frontend/src/app/features/user-preferences/notifications-settings/page/notifications-settings-page.component.ts
  2. 9
      frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.ts
  3. 6
      frontend/src/app/shared/components/forms/checkbox-field/checkbox-field.component.ts
  4. 4
      frontend/src/app/shared/components/popout/popout.component.html
  5. 30
      frontend/src/app/shared/components/popout/popout.component.ts
  6. 16
      frontend/src/app/shared/components/popout/popout.sass
  7. 20
      frontend/src/app/shared/components/project-list-select/project-list-select.component.html
  8. 0
      frontend/src/app/shared/components/project-list-select/project-list-select.component.sass
  9. 18
      frontend/src/app/shared/components/project-list-select/project-list-select.component.ts
  10. 5
      frontend/src/app/shared/shared.module.ts
  11. 1
      frontend/src/global_styles/common/openproject-common.module.sass

@ -109,7 +109,6 @@ export class NotificationsSettingsPageComponent extends UntilDestroyedMixin impl
public saveChanges():void {
this.update(this.form.value);
const prefs = this.query.getValue();
console.log(prefs);
this.stateService.update(this.userId, prefs);
}
@ -118,9 +117,7 @@ export class NotificationsSettingsPageComponent extends UntilDestroyedMixin impl
({ notifications }) => ({
notifications: arrayUpdate(
notifications,
(notification:NotificationSetting) => {
return notification._links.project.href === null;
},
(notification:NotificationSetting) => notification._links.project.href === null,
{
...delta,
mentioned: true,

@ -51,10 +51,9 @@ export class NotificationSettingsTableComponent {
private I18n:I18nService,
private store:UserPreferencesStore,
private query:UserPreferencesQuery,
) {
}
) {}
addRow(project:HalSourceLink) {
addRow(project:HalSourceLink):void {
const added:NotificationSetting[] = [
buildNotificationSetting(project, { channel: 'in_app' }),
buildNotificationSetting(project, { channel: 'mail' }),
@ -68,7 +67,7 @@ export class NotificationSettingsTableComponent {
);
}
update(delta:Partial<NotificationSetting>, projectHref: string) {
update(delta:Partial<NotificationSetting>, projectHref:string):void {
this.store.update(
({ notifications }) => ({
notifications: arrayUpdate(
@ -80,7 +79,7 @@ export class NotificationSettingsTableComponent {
);
}
removeProjectSettings(projectHref: string) {
removeProjectSettings(projectHref:string):void {
this.store.update(
({ notifications }) => ({
notifications: arrayRemove(notifications, (notification:NotificationSetting) => notification._links.project.href === projectHref),

@ -34,15 +34,15 @@ export class OpCheckboxFieldComponent {
internalID = `op-checkbox-field-${+new Date()}`;
get errorsID() {
get errorsID():string {
return `${this.internalID}-errors`;
}
get descriptionID() {
get descriptionID():string {
return `${this.internalID}-description`;
}
get describedByID() {
get describedByID():string {
return this.showErrorMessage ? this.errorsID : this.descriptionID;
}

@ -1,4 +0,0 @@
<ng-content select="[slot=trigger]"></ng-content>
<div class="op-popout--wrapper">
<ng-content select="[slot=trigger]"></ng-content>
</div>

@ -1,30 +0,0 @@
import {
Component,
HostBinding,
Input,
} from '@angular/core';
export enum OpPopoutAlignment {
Down = 'down',
Up = 'up',
}
@Component({
selector: 'op-popout',
templateUrl: './popout.component.html',
})
export class OpPopoutComponent {
@HostBinding('class.op-popout') className = true;
@HostBinding('class.op-popout_opened') get openedClassName() {
return this.opened;
}
@HostBinding('class') get alignmentClassName() {
return { [`op-popout_align-${this.alignment}`]: true };
}
@Input() alignment: OpPopoutAlignment = OpPopoutAlignment.Down;
public opened = false;
}

@ -1,16 +0,0 @@
.op-popout
display: inline-flex
&--wrapper
position: absolute
display: none
left: 0
&_opened &--wrapper
display: flex
&_align-down &--wrapper
top: 100%
&_align-up &--wrapper
bottom: 100%

@ -1,20 +0,0 @@
<div class="op-popout--headline">
<h1>Select project(s)</h1>
<button
class="op-link"
type="button"
(click)="clearSelection()"
></button>
</div>
<label>
<span class="hidden-for-sighted">Search</span>
<input
type="text"
(input)="search()"
/>
</label>
<ul>
<li>Project A</li>
</ul>

@ -1,18 +0,0 @@
import {
Component,
HostBinding,
} from '@angular/core';
@Component({
selector: 'op-project-list-select',
templateUrl: './project-list-select.component.html',
})
export class OpProjectListSelectComponent {
@HostBinding('class.op-project-list-select') className = true;
public clearSelection() {
}
public search() {
}
}

@ -71,7 +71,6 @@ import { SlideToggleComponent } from './components/slide-toggle/slide-toggle.com
import { DynamicBootstrapModule } from './components/dynamic-bootstrap/dynamic-bootstrap.module';
import { OpCheckboxFieldComponent } from './components/forms/checkbox-field/checkbox-field.component';
import { OpFormFieldComponent } from './components/forms/form-field/form-field.component';
import { OpPopoutComponent } from './components/popout/popout.component';
import { OpFormBindingDirective } from './components/forms/form-field/form-binding.directive';
import { OpOptionListComponent } from './components/option-list/option-list.component';
@ -176,8 +175,6 @@ export function bootstrapModule(injector:Injector) {
OpFormFieldComponent,
OpFormBindingDirective,
OpOptionListComponent,
OpPopoutComponent,
],
declarations: [
OpDateTimeComponent,
@ -230,8 +227,6 @@ export function bootstrapModule(injector:Injector) {
OpFormFieldComponent,
OpFormBindingDirective,
OpOptionListComponent,
OpPopoutComponent,
],
})
export class OPSharedModule {

@ -5,7 +5,6 @@
@import 'bubble/bubble'
@import '../../app/shared/components/forms'
@import '../../app/shared/components/option-list/option-list'
@import '../../app/shared/components/popout/popout'
@import '../../app/shared/components/table/table'
@import 'export-options/export-options'
@import 'select/select'

Loading…
Cancel
Save