From 38ac6ec4e9ee54f6fc745272877acd2a9175b159 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 9 Oct 2017 22:00:29 -0600 Subject: [PATCH] Linting --- web/app/app.module.ts | 2 +- .../custom_widget/custom_widget-config.component.ts | 2 +- web/app/configs/widget/widget.component.ts | 8 ++++---- .../fullscreen-button/fullscreen-button.component.html | 2 +- web/app/fullscreen-button/fullscreen-button.component.ts | 4 ++-- web/app/integration/integration.component.ts | 2 +- web/app/riot/riot.component.html | 8 ++++---- web/app/shared/my-filter.pipe.ts | 6 +++--- .../toggle-fullscreen.directive.ts | 6 +++--- 9 files changed, 20 insertions(+), 20 deletions(-) rename web/app/{toggle-fullscreen => shared}/toggle-fullscreen.directive.ts (70%) diff --git a/web/app/app.module.ts b/web/app/app.module.ts index 0c1bd14..d91123d 100644 --- a/web/app/app.module.ts +++ b/web/app/app.module.ts @@ -25,7 +25,7 @@ import { TravisCiConfigComponent } from "./configs/travisci/travisci-config.comp import { CustomWidgetConfigComponent } from "./configs/widget/custom_widget/custom_widget-config.component"; import { MyFilterPipe } from "./shared/my-filter.pipe"; import { GenericWidgetWrapperComponent } from "./widget_wrappers/generic/generic.component"; -import { ToggleFullscreenDirective } from "./toggle-fullscreen/toggle-fullscreen.directive"; +import { ToggleFullscreenDirective } from "./shared/toggle-fullscreen.directive"; import { FullscreenButtonComponent } from "./fullscreen-button/fullscreen-button.component"; @NgModule({ diff --git a/web/app/configs/widget/custom_widget/custom_widget-config.component.ts b/web/app/configs/widget/custom_widget/custom_widget-config.component.ts index 3c9d5ee..f2549d8 100644 --- a/web/app/configs/widget/custom_widget/custom_widget-config.component.ts +++ b/web/app/configs/widget/custom_widget/custom_widget-config.component.ts @@ -58,7 +58,7 @@ export class CustomWidgetConfigComponent extends WidgetComponent implements Moda private getWrappedUrl(url: string): string { const urls = [this.wrapperUrl].concat(SCALAR_WIDGET_LINKS); - for (var scalarUrl of urls) { + for (let scalarUrl of urls) { if (url.startsWith(scalarUrl)) { return decodeURIComponent(url.substring(scalarUrl.length)); } diff --git a/web/app/configs/widget/widget.component.ts b/web/app/configs/widget/widget.component.ts index 30f5ed5..e7e66c0 100644 --- a/web/app/configs/widget/widget.component.ts +++ b/web/app/configs/widget/widget.component.ts @@ -2,10 +2,10 @@ import { ScalarService } from "../../shared/scalar.service"; import { Widget, ScalarToWidgets } from "../../shared/models/widget"; export const SCALAR_WIDGET_LINKS = [ - 'https://scalar-staging.riot.im/scalar/api/widgets/generic.html?url=', - 'https://scalar-staging.vector.im/scalar/api/widgets/generic.html?url=', - 'https://scalar-develop.riot.im/scalar/api/widgets/generic.html?url=', - 'https://demo.riot.im/scalar/api/widgets/generic.html?url=', + "https://scalar-staging.riot.im/scalar/api/widgets/generic.html?url=", + "https://scalar-staging.vector.im/scalar/api/widgets/generic.html?url=", + "https://scalar-develop.riot.im/scalar/api/widgets/generic.html?url=", + "https://demo.riot.im/scalar/api/widgets/generic.html?url=", ]; export class WidgetComponent { diff --git a/web/app/fullscreen-button/fullscreen-button.component.html b/web/app/fullscreen-button/fullscreen-button.component.html index 9e714ba..5bc4c81 100644 --- a/web/app/fullscreen-button/fullscreen-button.component.html +++ b/web/app/fullscreen-button/fullscreen-button.component.html @@ -1,3 +1,3 @@ - \ No newline at end of file diff --git a/web/app/fullscreen-button/fullscreen-button.component.ts b/web/app/fullscreen-button/fullscreen-button.component.ts index f9ad72b..db6a23f 100644 --- a/web/app/fullscreen-button/fullscreen-button.component.ts +++ b/web/app/fullscreen-button/fullscreen-button.component.ts @@ -1,5 +1,5 @@ import { Component, OnDestroy, OnInit } from "@angular/core"; -import * as screenfull from 'screenfull'; +import * as screenfull from "screenfull"; @Component({ selector: "my-fullscreen-button", @@ -17,7 +17,7 @@ export class FullscreenButtonComponent implements OnDestroy, OnInit { } public ngOnInit(): void { - this.listener = screenfull.on('change', () => { + this.listener = screenfull.on("change", () => { this.isFullscreen = screenfull.isFullscreen; }); this.isFullscreen = screenfull.isFullscreen; diff --git a/web/app/integration/integration.component.ts b/web/app/integration/integration.component.ts index 3119e07..a2248a3 100644 --- a/web/app/integration/integration.component.ts +++ b/web/app/integration/integration.component.ts @@ -31,7 +31,7 @@ export class IntegrationComponent { this.updated.emit(); } - public configureIntegration(integrationId:string=null): void { + public configureIntegration(integrationId: string = null): void { this.modal.open(IntegrationService.getConfigComponent(this.integration), overlayConfigFactory({ integration: this.integration, roomId: this.roomId, diff --git a/web/app/riot/riot.component.html b/web/app/riot/riot.component.html index 257a1e5..7cf8442 100644 --- a/web/app/riot/riot.component.html +++ b/web/app/riot/riot.component.html @@ -16,7 +16,7 @@ ngbTooltip="Widgets add small apps to Riot, like Google Docs, Jitsi conferences, and YouTube videos">
-
- -
- it[field].toLowerCase() === value.toLowerCase()); } -} \ No newline at end of file +} diff --git a/web/app/toggle-fullscreen/toggle-fullscreen.directive.ts b/web/app/shared/toggle-fullscreen.directive.ts similarity index 70% rename from web/app/toggle-fullscreen/toggle-fullscreen.directive.ts rename to web/app/shared/toggle-fullscreen.directive.ts index 856bd42..bc33735 100644 --- a/web/app/toggle-fullscreen/toggle-fullscreen.directive.ts +++ b/web/app/shared/toggle-fullscreen.directive.ts @@ -1,12 +1,12 @@ import { Directive, HostListener } from "@angular/core"; -import * as screenfull from 'screenfull'; +import * as screenfull from "screenfull"; @Directive({ - selector: '[toggleFullscreen]', + selector: "[myToggleFullscreen]", }) export class ToggleFullscreenDirective { - @HostListener('click') onClick() { + @HostListener("click") onClick() { // HACK: This should be behind a service in the event the library changes if (screenfull.enabled) { screenfull.toggle();