Linting
This commit is contained in:
parent
27abf3ec1d
commit
38ac6ec4e9
|
@ -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({
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<button toggleFullscreen="">
|
||||
<button myToggleFullscreen="">
|
||||
<img [src]="isFullscreen ? '/img/exit-fullscreen.png' : '/img/enter-fullscreen.png'" />
|
||||
</button>
|
|
@ -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;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
ngbTooltip="Widgets add small apps to Riot, like Google Docs, Jitsi conferences, and YouTube videos"></i>
|
||||
</h4>
|
||||
<div class="integration-container">
|
||||
<my-integration *ngFor="let integration of integrations | myfilter:'type':'widget'"
|
||||
<my-integration *ngFor="let integration of integrations | myFilter:'type':'widget'"
|
||||
[integration]="integration"
|
||||
[roomId]="roomId"
|
||||
[scalarToken]="scalarToken"
|
||||
|
@ -31,12 +31,12 @@
|
|||
ngbTooltip="Bots can provide entertainment or some utility to your room"></i>
|
||||
</h4>
|
||||
<div class="integration-container">
|
||||
<my-integration *ngFor="let integration of integrations | myfilter:'type':'bot'"
|
||||
<my-integration *ngFor="let integration of integrations | myFilter:'type':'bot'"
|
||||
[integration]="integration"
|
||||
[roomId]="roomId"
|
||||
[scalarToken]="scalarToken"
|
||||
(updated)="updateIntegration(integration)"></my-integration>
|
||||
<my-integration *ngFor="let integration of integrations | myfilter:'type':'complex-bot'"
|
||||
<my-integration *ngFor="let integration of integrations | myFilter:'type':'complex-bot'"
|
||||
[integration]="integration"
|
||||
[roomId]="roomId"
|
||||
[scalarToken]="scalarToken"
|
||||
|
@ -51,7 +51,7 @@
|
|||
ngbTooltip="Bridges allow people on other platforms to talk in the room"></i>
|
||||
</h4>
|
||||
<div class="integration-container">
|
||||
<my-integration *ngFor="let integration of integrations | myfilter:'type':'bridge'"
|
||||
<my-integration *ngFor="let integration of integrations | myFilter:'type':'bridge'"
|
||||
[integration]="integration"
|
||||
[roomId]="roomId"
|
||||
[scalarToken]="scalarToken"
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import { Pipe, PipeTransform } from "@angular/core";
|
||||
|
||||
@Pipe({
|
||||
name: 'myfilter',
|
||||
name: "myFilter",
|
||||
pure: false
|
||||
})
|
||||
export class MyFilterPipe implements PipeTransform {
|
||||
transform(items: any[], field: string, value: string): any[] {
|
||||
if (!items) return [];
|
||||
if (!value || value.length == 0) return items;
|
||||
if (!value || value.length === 0) return items;
|
||||
return items.filter(it => it[field].toLowerCase() === value.toLowerCase());
|
||||
}
|
||||
}
|
|
@ -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();
|
Loading…
Reference in a new issue