Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(formatting): Update prettier to 1.15 #322

Merged
merged 1 commit into from
Nov 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions apps/angular-console/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,36 @@
<mat-sidenav-container id="navigationSidenavContainer">
<mat-sidenav #sidenav mode="over" [opened]="showSiteMenu" (closedStart)="showSiteMenu = false">
<mat-sidenav
#sidenav
mode="over"
[opened]="showSiteMenu"
(closedStart)="showSiteMenu = false"
>
<mat-nav-list>
<a routerLinkActive="active-link" mat-list-item (click)="showSiteMenu = false" [routerLink]="link.route" *ngFor="let link of sidenavLinks">
<a
routerLinkActive="active-link"
mat-list-item
(click)="showSiteMenu = false"
[routerLink]="link.route"
*ngFor="let link of sidenavLinks"
>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="12px">
<mat-icon>
{{ link.icon }}
</mat-icon>
<mat-icon> {{ link.icon }} </mat-icon>
<span>{{ link.text }}</span>
</div>
</a>
</mat-nav-list>
</mat-sidenav>
<mat-sidenav-content id="navigationSidenavContent">
<div fxLayout="column" fxFlex class="content-container">
<ui-contextual-action-bar (hamburgerClicked)="showSiteMenu = true"></ui-contextual-action-bar>
<ui-contextual-action-bar
(hamburgerClicked)="showSiteMenu = true"
></ui-contextual-action-bar>

<div fxFlex class="outlet-container" [@routerTransition]="routerTransition | async">
<div
fxFlex
class="outlet-container"
[@routerTransition]="routerTransition | async"
>
<router-outlet></router-outlet>
</div>

Expand Down
28 changes: 13 additions & 15 deletions apps/angular-console/src/index.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<base href="/">

<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" type="text/css" href="assets/xterm.css">
</head>

<body>
<angular-console-root></angular-console-root>
</body>

<head>
<meta charset="utf-8" />
<base href="/" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css" href="assets/xterm.css" />
</head>

<body>
<angular-console-root></angular-console-root>
</body>
</html>
163 changes: 125 additions & 38 deletions libs/feature-action-bar/src/lib/action-bar.component.html
Original file line number Diff line number Diff line change
@@ -1,82 +1,169 @@
<div class="action-bar-spacer" [@growShrink]="(showActionBar$ | async) ? 'expand' : 'contract'"></div>

<div class="action-bar-container" *ngIf="commands$ | async as actions">
<div
class="action-bar-spacer"
[@growShrink]="(showActionBar$ | async) ? 'expand' : 'contract'"
></div>

<div class="action-bar-container" *ngIf="(commands$ | async) as actions">
<!-- Show tasks toolbar -->
<mat-toolbar matRipple (click)="actionsExpanded.next(!actionsExpanded.value)"
[@growShrink]="(showActionToolbar$ | async) ? 'expand' : 'contract'"
class="action-bar">
<div fxLayout="row" fxLayoutGap="16px" fxLayoutAlign="start center" *ngIf="actions.length > 1" fxFlex>
<mat-toolbar
matRipple
(click)="actionsExpanded.next(!actionsExpanded.value)"
[@growShrink]="(showActionToolbar$ | async) ? 'expand' : 'contract'"
class="action-bar"
>
<div
fxLayout="row"
fxLayoutGap="16px"
fxLayoutAlign="start center"
*ngIf="actions.length > 1"
fxFlex
>
<button mat-icon-button [disableRipple]="true">
<mat-icon>{{ actionsExpanded ? 'expand_more' : 'expand_less' }}</mat-icon>
<mat-icon>{{
actionsExpanded ? 'expand_more' : 'expand_less'
}}</mat-icon>
</button>
<span fxFlex class="num-tasks">
{{ actions.length }} Tasks
</span>
<button mat-icon-button *ngIf="(actionsExpanded | async)" (click)="commandRunner.removeAllCommands()" class="remove-all-tasks-button">
<mat-icon matTooltip="Remove all tasks" matTooltipPosition="left">delete_sweep</mat-icon>
<span fxFlex class="num-tasks"> {{ actions.length }} Tasks </span>
<button
mat-icon-button
*ngIf="(actionsExpanded | async)"
(click)="commandRunner.removeAllCommands()"
class="remove-all-tasks-button"
>
<mat-icon matTooltip="Remove all tasks" matTooltipPosition="left"
>delete_sweep</mat-icon
>
</button>
</div>
</mat-toolbar>

<!-- Task list -->
<mat-list [@growShrink]="(showActionList$ | async) ? 'expand' : 'contract'">
<ng-container *ngFor="let action of actions; let last = last; trackBy: trackByCommandId" [ngSwitch]="action.status">
<mat-list-item [class.expanded]="expandedAction?.id === action.id" class="action-bar-title" @growShrink matRipple #itemRipple="matRipple" (click)="itemRipple.disabled ? '' : toggleItemExpansion(action.id)">

<ng-container
*ngFor="let action of actions; let last = last; trackBy: trackByCommandId"
[ngSwitch]="action.status"
>
<mat-list-item
[class.expanded]="expandedAction?.id === action.id"
class="action-bar-title"
@growShrink
matRipple
#itemRipple="matRipple"
(click)="itemRipple.disabled ? '' : toggleItemExpansion(action.id)"
>
<!-- Task avatar -->
<span class="task-avatar" #taskAvatar matListAvatar fxLayout="row" fxLayoutAlign="center center" [ngSwitch]="action.status"
[ngClass]="action.status" [class.freshly-toggled]="taskAvatar.freshlyToggled" (mouseenter)="itemRipple.disabled = true"
(mouseleave)="taskAvatar.freshlyToggled = false; itemRipple.disabled = false">
<mat-icon class="task-status" *ngSwitchCase="CommandStatus.SUCCESSFUL">
<span
class="task-avatar"
#taskAvatar
matListAvatar
fxLayout="row"
fxLayoutAlign="center center"
[ngSwitch]="action.status"
[ngClass]="action.status"
[class.freshly-toggled]="taskAvatar.freshlyToggled"
(mouseenter)="itemRipple.disabled = true"
(mouseleave)="
taskAvatar.freshlyToggled = false; itemRipple.disabled = false
"
>
<mat-icon
class="task-status"
*ngSwitchCase="CommandStatus.SUCCESSFUL"
>
done
</mat-icon>
<mat-icon class="task-status" *ngSwitchCase="CommandStatus.FAILED">
error
</mat-icon>
<mat-icon class="task-status clear-icon" *ngSwitchCase="CommandStatus.TERMINATED">
<mat-icon
class="task-status clear-icon"
*ngSwitchCase="CommandStatus.TERMINATED"
>
clear
</mat-icon>
<ng-container *ngSwitchCase="CommandStatus.IN_PROGRESS">
<mat-spinner *ngIf="showActionList$ | async" class="task-status" diameter=36>
<mat-spinner
*ngIf="(showActionList$ | async)"
class="task-status"
diameter="36"
>
</mat-spinner>
</ng-container>

<span class="process-action" [ngSwitch]="action.status">
<button class="replay-button" *ngSwitchDefault mat-icon-button (click)="handleRestart(action); taskAvatar.freshlyToggled = true">
<mat-icon [matTooltip]="'Restart ' + action.status + ' task'" matTooltipPosition="right">replay</mat-icon>
<button
class="replay-button"
*ngSwitchDefault
mat-icon-button
(click)="handleRestart(action); taskAvatar.freshlyToggled = true"
>
<mat-icon
[matTooltip]="'Restart ' + action.status + ' task'"
matTooltipPosition="right"
>replay</mat-icon
>
</button>
<button mat-icon-button *ngSwitchCase="CommandStatus.IN_PROGRESS" (click)="commandRunner.stopCommand(action.id); taskAvatar.freshlyToggled = true">
<mat-icon class="clear-icon" matTooltip="Stop task" matTooltipPosition="right">clear</mat-icon>
<button
mat-icon-button
*ngSwitchCase="CommandStatus.IN_PROGRESS"
(click)="
commandRunner.stopCommand(action.id);
taskAvatar.freshlyToggled = true
"
>
<mat-icon
class="clear-icon"
matTooltip="Stop task"
matTooltipPosition="right"
>clear</mat-icon
>
</button>
</span>
</span>

<h3 matLine class="command-text">
{{ action.command }}
</h3>
<h3 matLine class="command-text">{{ action.command }}</h3>

<p matLine class="second-line">
<!-- TODO(mrmeku): Re-enable this line when workspaces are assoicated with colors -->
<!-- <span class="workspace-indicator" [style.background]="getColorForWorkspace(action.workspacePath)"></span> -->
<!--
TODO(mrmeku): Re-enable this line when workspaces are assoicated with colors
-->
<!--
<span class="workspace-indicator" [style.background]="getColorForWorkspace(action.workspacePath)"></span>
-->
<span class="workspace-name">{{ action.workspace }}</span>
</p>

<button class="task-action" mat-icon-button (click)="commandRunner.removeCommand(action.id)" (mouseenter)="itemRipple.disabled = true"
(mouseleave)="itemRipple.disabled = false" class="remove-task-button">
<mat-icon matTooltip="Remove task" matTooltipPosition="left">delete_outline</mat-icon>
<button
class="task-action"
mat-icon-button
(click)="commandRunner.removeCommand(action.id)"
(mouseenter)="itemRipple.disabled = true"
(mouseleave)="itemRipple.disabled = false"
class="remove-task-button"
>
<mat-icon matTooltip="Remove task" matTooltipPosition="left"
>delete_outline</mat-icon
>
</button>
</mat-list-item>

<!-- Terminal output -->
<div class="output-container" #terminalContainer [@growShrinkTerminal]="{value: terminalHeight, params: {terminalHeight:
terminalHeight}}"
*ngIf="expandedAction?.id === action.id" (@growShrinkTerminal.done)="terminalContainer.expanded = true">
<div
class="output-container"
#terminalContainer
[@growShrinkTerminal]="{
value: terminalHeight,
params: { terminalHeight: terminalHeight }
}"
*ngIf="expandedAction?.id === action.id"
(@growShrinkTerminal.done)="terminalContainer.expanded = true"
>
<ui-command-output
#terminal
*ngIf="terminalContainer.expanded"
[command]="(expandedAction?.command | async)?.command"
[commandResponse]="expandedAction?.command | async">
[commandResponse]="expandedAction?.command | async"
>
</ui-command-output>
</div>

Expand Down
28 changes: 12 additions & 16 deletions libs/feature-extensions/src/lib/extension/extension.component.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
<ng-container *ngIf="extension$ | async as extension">
<ng-container *ngIf="(extension$ | async) as extension">
<ng-template [ngIf]="!extension.installed" [ngIfElse]="alreadyInstalled">
<ui-task-runner terminalWindowTitle="Task output">
<div class="ui-flags">
<ng-container *ngTemplateOutlet="alreadyInstalled"></ng-container>
</div>
<ui-command-output
[emptyTemplate]="emptyMessage"
[command]="command$ | async"
[commandResponse]="commandOutput$ | async">
</ui-command-output>
<div class="ui-flags">
<ng-container *ngTemplateOutlet="alreadyInstalled"></ng-container>
</div>
<ui-command-output
[emptyTemplate]="emptyMessage"
[command]="command$ | async"
[commandResponse]="commandOutput$ | async"
>
</ui-command-output>
</ui-task-runner>
</ng-template>
<ng-template #emptyMessage>
Click the Add button to install this extension.

</ng-template>
<ng-template #alreadyInstalled>
<div class="ui-flags">
<div class="name">
{{ extension.name }}
</div>
<div class="description">
{{ extension.description }}
</div>
<div class="name">{{ extension.name }}</div>
<div class="description">{{ extension.description }}</div>
</div>
</ng-template>
</ng-container>
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<ui-task-selector [taskCollections$]="taskCollections$" [filterPlaceholder]="'Filter extensions'" (selectionChange)="navigateToSelectedExtension($event)">
<ui-task-selector
[taskCollections$]="taskCollections$"
[filterPlaceholder]="'Filter extensions'"
(selectionChange)="navigateToSelectedExtension($event)"
>
<router-outlet></router-outlet>
</ui-task-selector>
27 changes: 17 additions & 10 deletions libs/feature-generate/src/lib/schematic/schematic.component.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
<ui-task-runner *ngIf="schematic$ | async as schematic" [terminalWindowTitle]="schematic.collection + ' - ' + schematic.name">
<ui-flags [prefix]="getPrefix(schematic)" [fields]="schematic.schema" (value)="onFlagsChange($event)"
[init]="initValues$ | async" [path]="path()"></ui-flags>
<ui-command-output [command]="command$|async"
[commandResponse]="combinedOutput$ | async"
[emptyTemplate]="emptyMessage">

<ui-task-runner
*ngIf="(schematic$ | async) as schematic"
[terminalWindowTitle]="schematic.collection + ' - ' + schematic.name"
>
<ui-flags
[prefix]="getPrefix(schematic)"
[fields]="schematic.schema"
(value)="onFlagsChange($event)"
[init]="initValues$ | async"
[path]="path()"
></ui-flags>
<ui-command-output
[command]="command$ | async"
[commandResponse]="combinedOutput$ | async"
[emptyTemplate]="emptyMessage"
>
</ui-command-output>
</ui-task-runner>
<ng-template #emptyMessage>
<ng-container>
Click the Generate button to start this task.
</ng-container>
<ng-container> Click the Generate button to start this task. </ng-container>
</ng-template>
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<ui-task-selector [taskCollections$]="taskCollections$" [filterPlaceholder]="'Filter schematics'" (selectionChange)="navigateToSelectedSchematic($event)">
<ui-task-selector
[taskCollections$]="taskCollections$"
[filterPlaceholder]="'Filter schematics'"
(selectionChange)="navigateToSelectedSchematic($event)"
>
<router-outlet></router-outlet>
</ui-task-selector>
Loading