mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-09-14 13:04:59 +00:00
Reformat code
This commit is contained in:
parent
a45232998a
commit
e9aecabab4
@ -1,11 +1,11 @@
|
|||||||
import { NgModule, ApplicationRef } from "@angular/core";
|
import { ApplicationRef, NgModule } from "@angular/core";
|
||||||
import { BrowserModule } from "@angular/platform-browser";
|
import { BrowserModule } from "@angular/platform-browser";
|
||||||
import { HttpModule } from "@angular/http";
|
import { HttpModule } from "@angular/http";
|
||||||
import { FormsModule } from "@angular/forms";
|
import { FormsModule } from "@angular/forms";
|
||||||
import { AppComponent } from "./app.component";
|
import { AppComponent } from "./app.component";
|
||||||
import { HomeComponent } from "./home/home.component";
|
import { HomeComponent } from "./home/home.component";
|
||||||
import { routing } from "./app.routing";
|
import { routing } from "./app.routing";
|
||||||
import { removeNgStyles, createNewHosts } from "@angularclass/hmr";
|
import { createNewHosts, removeNgStyles } from "@angularclass/hmr";
|
||||||
import { NgbModule } from "@ng-bootstrap/ng-bootstrap";
|
import { NgbModule } from "@ng-bootstrap/ng-bootstrap";
|
||||||
import { RiotComponent } from "./riot/riot.component";
|
import { RiotComponent } from "./riot/riot.component";
|
||||||
import { ApiService } from "./shared/api.service";
|
import { ApiService } from "./shared/api.service";
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
import { ModalComponent, DialogRef } from "ngx-modialog";
|
import { DialogRef, ModalComponent } from "ngx-modialog";
|
||||||
import { WidgetComponent } from "../widget.component";
|
import { WidgetComponent } from "../widget.component";
|
||||||
import { ScalarService } from "../../../shared/scalar.service";
|
import { ScalarService } from "../../../shared/scalar.service";
|
||||||
import { ConfigModalContext } from "../../../integration/integration.component";
|
import { ConfigModalContext } from "../../../integration/integration.component";
|
||||||
|
@ -52,7 +52,8 @@
|
|||||||
[(ngModel)]="widget.newUrl" name="widget-url-{{widget.id}}"
|
[(ngModel)]="widget.newUrl" name="widget-url-{{widget.id}}"
|
||||||
[disabled]="isUpdating">
|
[disabled]="isUpdating">
|
||||||
</label>
|
</label>
|
||||||
<button type="button" class="btn btn-primary btn-sm" (click)="validateAndSaveWidget(widget)">Save
|
<button type="button" class="btn btn-primary btn-sm" (click)="validateAndSaveWidget(widget)">
|
||||||
|
Save
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-outline btn-sm" (click)="toggleWidget(widget)">
|
<button type="button" class="btn btn-outline btn-sm" (click)="toggleWidget(widget)">
|
||||||
Cancel
|
Cancel
|
||||||
|
@ -52,7 +52,8 @@
|
|||||||
[(ngModel)]="widget.data.newDimChannelName" name="widget-url-{{widget.id}}"
|
[(ngModel)]="widget.data.newDimChannelName" name="widget-url-{{widget.id}}"
|
||||||
[disabled]="isUpdating">
|
[disabled]="isUpdating">
|
||||||
</label>
|
</label>
|
||||||
<button type="button" class="btn btn-primary btn-sm" (click)="validateAndSaveWidget(widget)">Save
|
<button type="button" class="btn btn-primary btn-sm" (click)="validateAndSaveWidget(widget)">
|
||||||
|
Save
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-outline btn-sm" (click)="toggleWidget(widget)">
|
<button type="button" class="btn btn-outline btn-sm" (click)="toggleWidget(widget)">
|
||||||
Cancel
|
Cancel
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
import { ModalComponent, DialogRef } from "ngx-modialog";
|
import { DialogRef, ModalComponent } from "ngx-modialog";
|
||||||
import { WidgetComponent } from "../widget.component";
|
import { WidgetComponent } from "../widget.component";
|
||||||
import { ScalarService } from "../../../shared/scalar.service";
|
import { ScalarService } from "../../../shared/scalar.service";
|
||||||
import { ConfigModalContext } from "../../../integration/integration.component";
|
import { ConfigModalContext } from "../../../integration/integration.component";
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { ScalarService } from "../../shared/scalar.service";
|
import { ScalarService } from "../../shared/scalar.service";
|
||||||
import { Widget, ScalarToWidgets } from "../../shared/models/widget";
|
import { ScalarToWidgets, Widget } from "../../shared/models/widget";
|
||||||
import { ToasterService } from "angular2-toaster";
|
import { ToasterService } from "angular2-toaster";
|
||||||
|
|
||||||
const SCALAR_WIDGET_LINKS = [
|
const SCALAR_WIDGET_LINKS = [
|
||||||
|
@ -52,7 +52,8 @@
|
|||||||
[(ngModel)]="widget.newUrl" name="widget-url-{{widget.id}}"
|
[(ngModel)]="widget.newUrl" name="widget-url-{{widget.id}}"
|
||||||
[disabled]="isUpdating">
|
[disabled]="isUpdating">
|
||||||
</label>
|
</label>
|
||||||
<button type="button" class="btn btn-primary btn-sm" (click)="validateAndSaveWidget(widget)">Save
|
<button type="button" class="btn btn-primary btn-sm" (click)="validateAndSaveWidget(widget)">
|
||||||
|
Save
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-outline btn-sm" (click)="toggleWidget(widget)">
|
<button type="button" class="btn btn-outline btn-sm" (click)="toggleWidget(widget)">
|
||||||
Cancel
|
Cancel
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
import { ModalComponent, DialogRef } from "ngx-modialog";
|
import { DialogRef, ModalComponent } from "ngx-modialog";
|
||||||
import { WidgetComponent } from "../widget.component";
|
import { WidgetComponent } from "../widget.component";
|
||||||
import { ScalarService } from "../../../shared/scalar.service";
|
import { ScalarService } from "../../../shared/scalar.service";
|
||||||
import { ConfigModalContext } from "../../../integration/integration.component";
|
import { ConfigModalContext } from "../../../integration/integration.component";
|
||||||
import { ToasterService } from "angular2-toaster";
|
import { ToasterService } from "angular2-toaster";
|
||||||
import { Widget, WIDGET_SCALAR_YOUTUBE, WIDGET_DIM_YOUTUBE } from "../../../shared/models/widget";
|
import { Widget, WIDGET_DIM_YOUTUBE, WIDGET_SCALAR_YOUTUBE } from "../../../shared/models/widget";
|
||||||
import * as embed from "embed-video";
|
import * as embed from "embed-video";
|
||||||
import * as $ from "jquery";
|
import * as $ from "jquery";
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
</pre>
|
</pre>
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
<p>Learn more on <a href="https://github.com/turt2live/matrix-dimension">Github</a>. Talk about it in <a href="https://matrix.to/#/#dimension:t2l.io">#dimension:t2l.io</a></p>
|
<p>Learn more on <a href="https://github.com/turt2live/matrix-dimension">Github</a>. Talk about it in <a
|
||||||
|
href="https://matrix.to/#/#dimension:t2l.io">#dimension:t2l.io</a></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
@ -4,14 +4,17 @@
|
|||||||
<b>{{ integration.name }}</b>
|
<b>{{ integration.name }}</b>
|
||||||
<div style="display: flex;">
|
<div style="display: flex;">
|
||||||
<div class="switch" *ngIf="integration.type !== 'bridge' && integration.type !== 'widget'">
|
<div class="switch" *ngIf="integration.type !== 'bridge' && integration.type !== 'widget'">
|
||||||
<ui-switch [checked]="integration.isEnabled" size="small" [disabled]="integration.isBroken" (change)="update()"></ui-switch>
|
<ui-switch [checked]="integration.isEnabled" size="small" [disabled]="integration.isBroken"
|
||||||
|
(change)="update()"></ui-switch>
|
||||||
</div>
|
</div>
|
||||||
<div class="switch" *ngIf="integration.type == 'bridge' && !integration.isEnabled">
|
<div class="switch" *ngIf="integration.type == 'bridge' && !integration.isEnabled">
|
||||||
<i class="fa fa-warning text-warning" ngbTooltip="{{ integration.bridgeError }}"></i>
|
<i class="fa fa-warning text-warning" ngbTooltip="{{ integration.bridgeError }}"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="toolbar">
|
<div class="toolbar">
|
||||||
<i class="fa fa-question-circle text-info" ngbTooltip="{{integration.about}}" *ngIf="integration.about"></i>
|
<i class="fa fa-question-circle text-info" ngbTooltip="{{integration.about}}"
|
||||||
<i class="fa fa-cog text-info config-icon" (click)="configureIntegration()" *ngIf="integration.isEnabled && integration.hasConfig"></i>
|
*ngIf="integration.about"></i>
|
||||||
|
<i class="fa fa-cog text-info config-icon" (click)="configureIntegration()"
|
||||||
|
*ngIf="integration.isEnabled && integration.hasConfig"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Component, Input, Output, EventEmitter } from "@angular/core";
|
import { Component, EventEmitter, Input, Output } from "@angular/core";
|
||||||
import { Integration } from "../shared/models/integration";
|
import { Integration } from "../shared/models/integration";
|
||||||
import { overlayConfigFactory } from "ngx-modialog";
|
import { overlayConfigFactory } from "ngx-modialog";
|
||||||
import { Modal, BSModalContext } from "ngx-modialog/plugins/bootstrap";
|
import { BSModalContext, Modal } from "ngx-modialog/plugins/bootstrap";
|
||||||
import { IntegrationService } from "../shared/integration.service";
|
import { IntegrationService } from "../shared/integration.service";
|
||||||
|
|
||||||
export class ConfigModalContext extends BSModalContext {
|
export class ConfigModalContext extends BSModalContext {
|
||||||
|
@ -6,7 +6,7 @@ import { ToasterService } from "angular2-toaster";
|
|||||||
import { Integration } from "../shared/models/integration";
|
import { Integration } from "../shared/models/integration";
|
||||||
import { IntegrationService } from "../shared/integration.service";
|
import { IntegrationService } from "../shared/integration.service";
|
||||||
import * as _ from "lodash";
|
import * as _ from "lodash";
|
||||||
import { WIDGET_DIM_CUSTOM, WIDGET_DIM_YOUTUBE, WIDGET_DIM_TWITCH, WIDGET_DIM_ETHERPAD } from "../shared/models/widget";
|
import { WIDGET_DIM_CUSTOM, WIDGET_DIM_ETHERPAD, WIDGET_DIM_TWITCH, WIDGET_DIM_YOUTUBE } from "../shared/models/widget";
|
||||||
import { IntegrationComponent } from "../integration/integration.component";
|
import { IntegrationComponent } from "../integration/integration.component";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { Injectable } from "@angular/core";
|
import { Injectable } from "@angular/core";
|
||||||
import * as randomString from "random-string";
|
import * as randomString from "random-string";
|
||||||
import {
|
import {
|
||||||
|
JoinRuleStateResponse,
|
||||||
MembershipStateResponse,
|
MembershipStateResponse,
|
||||||
ScalarSuccessResponse,
|
ScalarSuccessResponse,
|
||||||
JoinRuleStateResponse,
|
|
||||||
WidgetsResponse
|
WidgetsResponse
|
||||||
} from "./models/scalar_responses";
|
} from "./models/scalar_responses";
|
||||||
import { Widget } from "./models/widget";
|
import { Widget } from "./models/widget";
|
||||||
|
@ -6,7 +6,8 @@ import * as screenfull from "screenfull";
|
|||||||
})
|
})
|
||||||
export class ToggleFullscreenDirective {
|
export class ToggleFullscreenDirective {
|
||||||
|
|
||||||
@HostListener("click") onClick() {
|
@HostListener("click")
|
||||||
|
onClick() {
|
||||||
// HACK: This should be behind a service in the event the library changes
|
// HACK: This should be behind a service in the event the library changes
|
||||||
if (screenfull.enabled) {
|
if (screenfull.enabled) {
|
||||||
screenfull.toggle();
|
screenfull.toggle();
|
||||||
|
Loading…
Reference in New Issue
Block a user