Format web code

This commit is contained in:
Travis Ralston 2019-07-10 22:17:16 -06:00
parent 2e19cec215
commit 2737850e6f
40 changed files with 159 additions and 105 deletions

View File

@ -6,8 +6,8 @@
<div class="my-ibox-content">
<p>
<a href="https://github.com/matrix-org/matrix-appservice-gitter" target="_blank">matrix-appservice-gitter</a>
is a Gitter bridge that supports bridging Gitter rooms to Matrix. Users on Matrix are represented as a single
bot user in Gitter, however Gitter users are represented as real-looking Matrix users in the room.
is a Gitter bridge that supports bridging Gitter rooms to Matrix. Users on Matrix are represented as a
single bot user in Gitter, however Gitter users are represented as real-looking Matrix users in the room.
</p>
<table class="table table-striped table-condensed table-bordered">
@ -24,7 +24,8 @@
<tr *ngFor="let bridge of configurations trackById">
<td>
{{ bridge.upstreamId ? "matrix.org's bridge" : "Self-hosted bridge" }}
<span class="text-muted" style="display: inline-block;" *ngIf="!bridge.upstreamId">({{ bridge.provisionUrl }})</span>
<span class="text-muted" style="display: inline-block;"
*ngIf="!bridge.upstreamId">({{ bridge.provisionUrl }})</span>
</td>
<td class="text-center">
<span class="editButton" (click)="editBridge(bridge)" *ngIf="!bridge.upstreamId">
@ -34,10 +35,12 @@
</tr>
</tbody>
</table>
<button type="button" class="btn btn-success btn-sm" (click)="addModularHostedBridge()" [disabled]="(configurations && configurations.length > 0) || isUpdating">
<button type="button" class="btn btn-success btn-sm" (click)="addModularHostedBridge()"
[disabled]="(configurations && configurations.length > 0) || isUpdating">
<i class="fa fa-plus"></i> Add matrix.org's bridge
</button>
<button type="button" class="btn btn-success btn-sm" (click)="addSelfHostedBridge()" [disabled]="(configurations && configurations.length > 0) || isUpdating">
<button type="button" class="btn btn-success btn-sm" (click)="addSelfHostedBridge()"
[disabled]="(configurations && configurations.length > 0) || isUpdating">
<i class="fa fa-plus"></i> Add self-hosted bridge
</button>
</div>

View File

@ -3,7 +3,10 @@
<h4>{{ isAdding ? "Add a new" : "Edit" }} self-hosted Gitter bridge</h4>
</div>
<div class="dialog-content">
<p>Self-hosted Gitter bridges already have provisioning enabled. Be careful not to expose the API to the public internet.</p>
<p>
Self-hosted Gitter bridges already have provisioning enabled. Be careful not to expose the API to the public
internet.
</p>
<label class="label-block">
Provisioning URL

View File

@ -25,7 +25,8 @@
<tr *ngFor="let bridge of configurations trackById">
<td>
{{ bridge.upstreamId ? "matrix.org's bridge" : "Self-hosted bridge" }}
<span class="text-muted" style="display: inline-block;" *ngIf="!bridge.upstreamId">({{ bridge.provisionUrl }})</span>
<span class="text-muted" style="display: inline-block;"
*ngIf="!bridge.upstreamId">({{ bridge.provisionUrl }})</span>
</td>
<td *ngIf="bridge.isOnline">
{{ getEnabledNetworksString(bridge) }}
@ -42,7 +43,8 @@
</tr>
</tbody>
</table>
<button type="button" class="btn btn-success btn-sm" (click)="addModularHostedBridge()" *ngIf="!hasModularBridge">
<button type="button" class="btn btn-success btn-sm" (click)="addModularHostedBridge()"
*ngIf="!hasModularBridge">
<i class="fa fa-plus"></i> Add matrix.org's bridge
</button>
<button type="button" class="btn btn-success btn-sm" (click)="addSelfHostedBridge()">

View File

@ -3,7 +3,10 @@
<h4>{{ isAdding ? "Add a new" : "Edit" }} self-hosted Slack bridge</h4>
</div>
<div class="dialog-content">
<p>Self-hosted Slack bridges already have provisioning enabled. Be careful not to expose the API to the public internet.</p>
<p>
Self-hosted Slack bridges already have provisioning enabled. Be careful not to expose the API to the public
internet.
</p>
<label class="label-block">
Provisioning URL

View File

@ -5,9 +5,10 @@
<my-ibox boxTitle="Slack Bridge Configurations">
<div class="my-ibox-content">
<p>
<a href="https://github.com/matrix-org/matrix-appservice-slack" target="_blank">matrix-appservice-slack</a>
is a Slack bridge that supports bridging Slack channels to Matrix. Users authorize the bridge to access their
Slack workspaces and from there they can pick the channels they'd like to bridge.
<a href="https://github.com/matrix-org/matrix-appservice-slack"
target="_blank">matrix-appservice-slack</a>
is a Slack bridge that supports bridging Slack channels to Matrix. Users authorize the bridge to access
their Slack workspaces and from there they can pick the channels they'd like to bridge.
</p>
<table class="table table-striped table-condensed table-bordered">
@ -24,7 +25,8 @@
<tr *ngFor="let bridge of configurations trackById">
<td>
{{ bridge.upstreamId ? "matrix.org's bridge" : "Self-hosted bridge" }}
<span class="text-muted" style="display: inline-block;" *ngIf="!bridge.upstreamId">({{ bridge.provisionUrl }})</span>
<span class="text-muted" style="display: inline-block;"
*ngIf="!bridge.upstreamId">({{ bridge.provisionUrl }})</span>
</td>
<td class="text-center">
<span class="editButton" (click)="editBridge(bridge)" *ngIf="!bridge.upstreamId">
@ -34,10 +36,12 @@
</tr>
</tbody>
</table>
<button type="button" class="btn btn-success btn-sm" (click)="addModularHostedBridge()" [disabled]="(configurations && configurations.length > 0) || isUpdating">
<button type="button" class="btn btn-success btn-sm" (click)="addModularHostedBridge()"
[disabled]="(configurations && configurations.length > 0) || isUpdating">
<i class="fa fa-plus"></i> Add matrix.org's bridge
</button>
<button type="button" class="btn btn-success btn-sm" (click)="addSelfHostedBridge()" [disabled]="(configurations && configurations.length > 0) || isUpdating">
<button type="button" class="btn btn-success btn-sm" (click)="addSelfHostedBridge()"
[disabled]="(configurations && configurations.length > 0) || isUpdating">
<i class="fa fa-plus"></i> Add self-hosted bridge
</button>
</div>

View File

@ -27,7 +27,8 @@
<tr *ngFor="let bridge of configurations trackById">
<td>
{{ bridge.upstreamId ? "matrix.org's bridge" : "Self-hosted bridge" }}
<span class="text-muted" style="display: inline-block;" *ngIf="!bridge.upstreamId">({{ bridge.provisionUrl }})</span>
<span class="text-muted" style="display: inline-block;"
*ngIf="!bridge.upstreamId">({{ bridge.provisionUrl }})</span>
</td>
<td>
{{ getEnabledFeaturesString(bridge) }}
@ -40,7 +41,8 @@
</tr>
</tbody>
</table>
<button type="button" class="btn btn-success btn-sm" (click)="addSelfHostedBridge()" [disabled]="configurations && configurations.length > 0">
<button type="button" class="btn btn-success btn-sm" (click)="addSelfHostedBridge()"
[disabled]="configurations && configurations.length > 0">
<i class="fa fa-plus"></i> Add self-hosted bridge
</button>
</div>

View File

@ -23,7 +23,8 @@
<tr *ngFor="let bridge of configurations trackById">
<td>
{{ bridge.upstreamId ? "matrix.org's bridge" : "Self-hosted bridge" }}
<span class="text-muted" style="display: inline-block;" *ngIf="!bridge.upstreamId">({{ bridge.provisionUrl }})</span>
<span class="text-muted" style="display: inline-block;"
*ngIf="!bridge.upstreamId">({{ bridge.provisionUrl }})</span>
</td>
<td class="text-center">
<span class="editButton" (click)="editBridge(bridge)">
@ -33,7 +34,8 @@
</tr>
</tbody>
</table>
<button type="button" class="btn btn-success btn-sm" (click)="addSelfHostedBridge()" [disabled]="configurations && configurations.length > 0">
<button type="button" class="btn btn-success btn-sm" (click)="addSelfHostedBridge()"
[disabled]="configurations && configurations.length > 0">
<i class="fa fa-plus"></i> Add self-hosted bridge
</button>
</div>

View File

@ -4,7 +4,10 @@
<div *ngIf="!isLoading">
<my-ibox boxTitle="Configuration">
<div class="my-ibox-content">
<p>Parts of your configuration are displayed below. To change these values, edit your configuration and restart Dimension.</p>
<p>
Parts of your configuration are displayed below. To change these values, edit your configuration and
restart Dimension.
</p>
<div class="row">
<div class="col-md-4">

View File

@ -5,8 +5,8 @@
<div class="dialog-content">
<p>
Logging everyone out will disable all known login tokens for Dimension and upstream integration managers.
Most clients will automatically re-register for a login token behind the scenes, similar to how a login token
was first acquired.
Most clients will automatically re-register for a login token behind the scenes, similar to how a login
token was first acquired.
</p>
</div>
<div class="dialog-footer">

View File

@ -11,5 +11,6 @@ export class LogoutConfirmationDialogContext extends BSModalContext {
})
export class AdminLogoutConfirmationDialogComponent implements ModalComponent<LogoutConfirmationDialogContext> {
constructor(public dialog: DialogRef<LogoutConfirmationDialogContext>) {}
constructor(public dialog: DialogRef<LogoutConfirmationDialogContext>) {
}
}

View File

@ -1,6 +1,9 @@
<my-ibox boxTitle="New self-hosted go-neb">
<div class="my-ibox-content">
<p>Self-hosted go-neb instances are powered by application services installed on your homeserver. The application service is responsible for creating the bots dynamically.</p>
<p>
Self-hosted go-neb instances are powered by application services installed on your homeserver. The
application service is responsible for creating the bots dynamically.
</p>
<label class="label-block">
User Prefix

View File

@ -24,7 +24,8 @@
<tr *ngFor="let neb of configurations trackById">
<td>
{{ neb.upstreamId ? "matrix.org's go-neb" : "Self-hosted go-neb" }}
<span class="text-muted" style="display: inline-block;" *ngIf="!neb.upstreamId">({{ neb.adminUrl }})</span>
<span class="text-muted" style="display: inline-block;"
*ngIf="!neb.upstreamId">({{ neb.adminUrl }})</span>
</td>
<td>
{{ getEnabledBotsString(neb) }}

View File

@ -11,7 +11,8 @@
</p>
<div class="input-group input-group-sm telegram-import">
<input type="text" class="form-control" [(ngModel)]="tgUrl" placeholder="https://t.me/addstickers/YourPackID"
<input type="text" class="form-control" [(ngModel)]="tgUrl"
placeholder="https://t.me/addstickers/YourPackID"
[disabled]="isImporting"/>
<span class="input-group-btn">
<button class="btn btn-primary" (click)="startTelegramImport()" [disabled]="!tgUrl || isImporting">

View File

@ -10,7 +10,8 @@
<label class="label-block">
Name
<span class="text-muted ">The translated name of your policy</span>
<input type="text" class="form-control" placeholder="My Policy" [(ngModel)]="languages[code].name" [disabled]="isUpdating"/>
<input type="text" class="form-control" placeholder="My Policy" [(ngModel)]="languages[code].name"
[disabled]="isUpdating"/>
</label>
<label class="label-block">
Policy text

View File

@ -28,7 +28,8 @@
<td>{{ policy.version }}</td>
<td class="text-center">
<span class="editButton" [routerLink]="['edit', policy.shortcode]" title="edit draft" *ngIf="policy.version == 'draft'">
<span class="editButton" [routerLink]="['edit', policy.shortcode]" title="edit draft"
*ngIf="policy.version == 'draft'">
<i class="fa fa-pencil-alt"></i>
</span>
</td>

View File

@ -20,7 +20,8 @@
<td>{{ widget.displayName }}</td>
<td>{{ widget.description }}</td>
<td class="text-right">
<span class="editButton" (click)="editWidget(widget)" *ngIf="widget.isEnabled && hasConfiguration(widget)">
<span class="editButton" (click)="editWidget(widget)"
*ngIf="widget.isEnabled && hasConfiguration(widget)">
<i class="fa fa-pencil-alt"></i>
</span>
<ui-switch [checked]="widget.isEnabled" size="small" [disabled]="isUpdating"

View File

@ -25,10 +25,12 @@
</label>
<div class="input-group input-group-sm">
<div class="input-group-addon">#</div>
<input title="channel" type="text" class="form-control form-control-sm" [(ngModel)]="channel" [disabled]="loadingOps">
<input title="channel" type="text" class="form-control form-control-sm" [(ngModel)]="channel"
[disabled]="loadingOps">
</div>
<div style="margin-top: 25px">
<button type="button" class="btn btn-sm btn-primary" [disabled]="loadingOps" (click)="loadOps()">
<button type="button" class="btn btn-sm btn-primary" [disabled]="loadingOps"
(click)="loadOps()">
Next
</button>
</div>
@ -43,7 +45,8 @@
</select>
</label>
<div style="margin-top: 25px">
<button type="button" class="btn btn-sm btn-primary" [disabled]="requestingBridge" (click)="requestBridge()">
<button type="button" class="btn btn-sm btn-primary" [disabled]="requestingBridge"
(click)="requestBridge()">
Request Bridge
</button>
</div>

View File

@ -7,7 +7,8 @@
the other room and instead bridge it here?
</div>
<div class="dialog-footer">
<button type="button" (click)="unbridgeAndContinue()" title="unbridge and continue" class="btn btn-danger btn-sm">
<button type="button" (click)="unbridgeAndContinue()" title="unbridge and continue"
class="btn btn-danger btn-sm">
Unbridge and continue
</button>
<button type="button" (click)="cancel()" title="cancel" class="btn btn-primary btn-sm">

View File

@ -8,7 +8,8 @@
<div *ngIf="isBridged">
This room is bridged to "{{ chatName }}" (<code>{{ chatId }}</code>) on Telegram.
<div *ngIf="canUnbridge">
<button type="button" class="btn btn-sm btn-danger" [disabled]="isUpdating" (click)="unbridgeRoom()">
<button type="button" class="btn btn-sm btn-danger" [disabled]="isUpdating"
(click)="unbridgeRoom()">
Unbridge
</button>
</div>
@ -20,7 +21,8 @@
<label class="label-block">
Chat ID
<span class="text-muted">After inviting <a href="https://t.me/{{ botUsername }}" target="_blank">@{{ botUsername }}</a> to your Telegram chat, run the command <code>/id</code> in the Telegram room to get the chat ID.</span>
<input title="chat ID" type="text" class="form-control form-control-sm col-md-3" [(ngModel)]="chatId" [disabled]="isUpdating" />
<input title="chat ID" type="text" class="form-control form-control-sm col-md-3"
[(ngModel)]="chatId" [disabled]="isUpdating"/>
</label>
<button type="button" class="btn btn-sm btn-primary" [disabled]="isUpdating" (click)="bridgeRoom()">
Bridge

View File

@ -7,7 +7,8 @@
<div class="my-ibox-content">
<label class="label-block">
Webhook Name
<input title="webhook name" type="text" class="form-control form-control-sm" [(ngModel)]="webhookName" [disabled]="isBusy">
<input title="webhook name" type="text" class="form-control form-control-sm"
[(ngModel)]="webhookName" [disabled]="isBusy">
</label>
<div style="margin-top: 25px">
<button type="button" class="btn btn-sm btn-primary" [disabled]="isBusy" (click)="newHook()">

View File

@ -5,7 +5,9 @@
.travis.yml configuration and template information
</h5>
<div class="my-ibox-content">
<p>The following section needs to be added to your <code>.travis.yml</code> file in your repositories:</p>
<p>
The following section needs to be added to your <code>.travis.yml</code> file in your repositories:
</p>
<pre>{{ travisYaml }}</pre>
<p>
@ -50,7 +52,9 @@
<tr *ngFor="let repo of getRepos()">
<td>{{ repo.repoKey }}</td>
<td>
<textarea title="Repository Template" class="repo-template form-control" rows="3" (change)="repo.template = $event.target.value" [disabled]="isUpdating || !repo.isSelf">{{ repo.template }}</textarea>
<textarea title="Repository Template" class="repo-template form-control" rows="3"
(change)="repo.template = $event.target.value"
[disabled]="isUpdating || !repo.isSelf">{{ repo.template }}</textarea>
</td>
<td>{{ repo.addedByUserId }}</td>
<td class="actions-col">

View File

@ -36,7 +36,8 @@
<span class="name">{{ pack.displayName }}</span>
<span class="description">{{ pack.description }}</span>
<span class="author" *ngIf="pack.author.type !== 'none'">Created by <a [href]="pack.author.reference">{{ pack.author.name }}</a> under </span>
<span class="author" *ngIf="pack.author.type !== 'none'">Created by <a
[href]="pack.author.reference">{{ pack.author.name }}</a> under </span>
<span class="license"><a [href]="pack.license.urlPath">{{ pack.license.name }}</a></span>
</div>
</div>

View File

@ -8,7 +8,8 @@
</h5>
<div class="my-ibox-content">
<form (submit)="widgetComponent.addWidget()" novalidate name="addForm">
<ng-container *ngTemplateOutlet="widgetParamsTemplate;context:{widget:widgetComponent.newWidget}"></ng-container>
<ng-container
*ngTemplateOutlet="widgetParamsTemplate;context:{widget:widgetComponent.newWidget}"></ng-container>
<div style="margin-top: 25px">
<button type="submit" class="btn btn-sm btn-success" [disabled]="widgetComponent.isUpdating">
@ -19,7 +20,8 @@
</div>
</my-ibox>
<my-ibox *ngFor="let widget of widgetComponent.widgets trackById" [isCollapsible]="true" [defaultCollapsed]="widget.id !== widgetComponent.defaultExpandedWidgetId">
<my-ibox *ngFor="let widget of widgetComponent.widgets trackById" [isCollapsible]="true"
[defaultCollapsed]="widget.id !== widgetComponent.defaultExpandedWidgetId">
<h5 class="my-ibox-title">
<i class="fa fa-pencil-alt"></i> {{ widget.name || widget.url || widgetComponent.defaultName }}
<span *ngIf="widget.data.title">- {{ widget.data.title }}</span>
@ -32,7 +34,8 @@
<button type="submit" class="btn btn-sm btn-primary" [disabled]="widgetComponent.isUpdating">
<i class="far fa-save"></i> Save Widget
</button>
<button type="button" class="btn btn-sm btn-outline-danger" [disabled]="widgetComponent.isUpdating" (click)="widgetComponent.removeWidget(widget)">
<button type="button" class="btn btn-sm btn-outline-danger" [disabled]="widgetComponent.isUpdating"
(click)="widgetComponent.removeWidget(widget)">
<i class="far fa-trash-alt"></i> Remove Widget
</button>
</div>

View File

@ -2,7 +2,8 @@
<ng-template #widgetParamsTemplate let-widget="widget">
<label class="label-block">
Trading Pair
<select class="form-control form-control-sm" [(ngModel)]="widget.dimension.newData.pair" [disabled]="isUpdating" name="widget-pair-{{widget.id}}">
<select class="form-control form-control-sm" [(ngModel)]="widget.dimension.newData.pair"
[disabled]="isUpdating" name="widget-pair-{{widget.id}}">
<option *ngFor="let pair of pairs" [ngValue]="pair.value">
{{ pair.label }}
</option>
@ -11,7 +12,8 @@
<label class="label-block">
Interval
<select class="form-control form-control-sm" [(ngModel)]="widget.dimension.newData.interval" [disabled]="isUpdating" name="widget-interval-{{widget.id}}">
<select class="form-control form-control-sm" [(ngModel)]="widget.dimension.newData.interval"
[disabled]="isUpdating" name="widget-interval-{{widget.id}}">
<option *ngFor="let interval of intervals" [ngValue]="interval.value">
{{ interval.label }}
</option>

View File

@ -37,7 +37,8 @@
<div *ngFor="let category of getCategories()">
<my-ibox *ngIf="getIntegrationsIn(category).length > 0" boxTitle="{{category}}" [isCollapsible]="true">
<div class="my-ibox-content">
<my-integration-bag [integrations]="getIntegrationsIn(category)" (integrationClicked)="modifyIntegration($event)"></my-integration-bag>
<my-integration-bag [integrations]="getIntegrationsIn(category)"
(integrationClicked)="modifyIntegration($event)"></my-integration-bag>
</div>
</my-ibox>
</div>

View File

@ -5,7 +5,9 @@ import {
WIDGET_GOOGLE_CALENDAR,
WIDGET_GOOGLE_DOCS,
WIDGET_GRAFANA,
WIDGET_JITSI, WIDGET_SPOTIFY, WIDGET_STICKER_PICKER,
WIDGET_JITSI,
WIDGET_SPOTIFY,
WIDGET_STICKER_PICKER,
WIDGET_TRADINGVIEW,
WIDGET_TWITCH,
WIDGET_YOUTUBE

View File

@ -5,7 +5,8 @@ import {
JoinRuleStateResponse,
MembershipStateResponse,
RoomEncryptionStatusResponse,
ScalarSuccessResponse, ScalarWidget,
ScalarSuccessResponse,
ScalarWidget,
SetPowerLevelResponse,
WidgetsResponse
} from "../../models/server-client-responses";

View File

@ -17,14 +17,16 @@
<div class="sticker-pack" *ngFor="let pack of packs trackById">
<div class="header">
<span class="title">{{ pack.displayName }}</span>
<span class="license"><a [href]="pack.license.urlPath" target="_blank">{{ pack.license.name }}</a></span>
<span class="license"><a [href]="pack.license.urlPath"
target="_blank">{{ pack.license.name }}</a></span>
<span class="author" *ngIf="pack.author.type !== 'none'">
<a [href]="pack.author.reference" target="_blank">{{ pack.author.name }}</a>
</span>
</div>
<div class="stickers">
<div class="sticker" *ngFor="let sticker of pack.stickers trackById" (click)="sendSticker(sticker, pack)">
<div class="sticker" *ngFor="let sticker of pack.stickers trackById"
(click)="sendSticker(sticker, pack)">
<img [src]="getThumbnailUrl(sticker.thumbnail.mxc, 48, 48)" width="48" height="48" class="image"
[alt]="sticker.name" [ngbTooltip]="sticker.name" placement="bottom"/>
</div>

View File

@ -1,5 +1,6 @@
import "reflect-metadata";
import "ts-helpers";
require("zone.js/dist/zone");
//noinspection TypeScriptUnresolvedVariable

View File

@ -1,7 +1,6 @@
// The CSS for the Riot breadcrumb is specified here to ensure that it's style can be overridden.
// In it's current position (as a component), the component-level stylesheet cannot access the
// elements, so we specify it in a more generic location.
@import "themes/themes";
.main-app {