This repository has been archived by the owner on Jul 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add the 'About' menu with changelog
- Loading branch information
1 parent
fe4c1d7
commit 8815279
Showing
26 changed files
with
1,633 additions
and
1,606 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,3 @@ | |
### v0.3.0 (TBA) | ||
|
||
- Everything is rewritten | ||
- | ||
|
||
#### |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/app/editor/about/about-modal/about-modal.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<div mat-dialog-content> | ||
<div class="header layout-row layout-align-start-center"> | ||
<img src="assets/images/icon.svg" class="CDK"> | ||
<h1> | ||
Control Development Kit | ||
<small>Version {{ version }} built on {{ builtAt | amDateFormat: 'YYYY-MM-DD' }} in Redmond, WA.</small> | ||
</h1> | ||
</div> | ||
<about-changelog></about-changelog> | ||
</div> | ||
|
||
<div mat-dialog-actions> | ||
<footer> | ||
<span>Copyright Microsoft. <a class="body-link" (click)="openLicenses()">Show Licenses</a>.</span> | ||
</footer> | ||
<span class="flex-fill"></span> | ||
<button mat-button (click)="dialog.close()">Close</button> | ||
</div> |
33 changes: 33 additions & 0 deletions
33
src/app/editor/about/about-modal/about-modal.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
@import '../../../assets/styles/declarations'; | ||
|
||
:host { | ||
width: 500px; | ||
display: block; | ||
} | ||
|
||
.header { | ||
img { | ||
width: 64px; | ||
margin-right: $dimension-gutter-md * (3 / 2); | ||
} | ||
|
||
h1 { | ||
font-weight: normal; | ||
|
||
small { | ||
display: block; | ||
font-size: 0.4em; | ||
} | ||
} | ||
} | ||
|
||
changelog { | ||
max-height: 50vh; | ||
} | ||
|
||
footer { | ||
font-size: 0.8em; | ||
display: flex; | ||
align-items: center; | ||
color: $color-text-muted; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
import { MatDialogRef } from '@angular/material'; | ||
|
||
import { AppConfig } from '../../editor.config'; | ||
|
||
/** | ||
* The InstallNodeModalComponent is shown instructing the user to install | ||
* Node.js. It appears if Node isn't found in the user's path. | ||
*/ | ||
@Component({ | ||
selector: 'about-modal', | ||
templateUrl: './about-modal.component.html', | ||
styleUrls: ['./about-modal.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class AboutModalComponent { | ||
/** | ||
* CDK version. | ||
*/ | ||
public readonly version = AppConfig.version; | ||
|
||
/** | ||
* Date the CDK was built. | ||
*/ | ||
public readonly builtAt = AppConfig.builtAt; | ||
|
||
constructor(public readonly dialog: MatDialogRef<void>) {} | ||
|
||
public openLicenses() { | ||
window.open(`3rdpartylicenses.txt`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { CommonModule } from '@angular/common'; | ||
import { NgModule } from '@angular/core'; | ||
import { MomentModule } from 'angular2-moment'; | ||
|
||
import { MatButtonModule, MatDialogModule } from '@angular/material'; | ||
import { AboutModalComponent } from './about-modal/about-modal.component'; | ||
import { ChangelogComponent } from './changelog/changelog.component'; | ||
|
||
/** | ||
* Module that displays the "about" menu, with changelog. | ||
*/ | ||
@NgModule({ | ||
imports: [MomentModule, CommonModule, MatButtonModule, MatDialogModule], | ||
declarations: [AboutModalComponent, ChangelogComponent], | ||
entryComponents: [AboutModalComponent], | ||
}) | ||
export class AboutModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<h1 id="changelog">Changelog</h1> | ||
<p><a name="v0.3.0"></a></p> | ||
<h3 id="v0-3-0-tba-">v0.3.0 (TBA)</h3> | ||
<ul> | ||
<li>Everything is rewritten</li> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@import '../../../assets/styles/declarations'; | ||
|
||
:host { | ||
display: block; | ||
background: $color-medium-gray; | ||
margin-top: $dimension-gutter-sm; | ||
padding: $dimension-gutter-sm; | ||
box-shadow: inset 0 3px 8px rgba(#000, 0.2); | ||
font-size: 0.8em; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
|
||
/** | ||
* The ChangelogComponents holds the marked-rendered changelog html, | ||
* and applies some small styling. | ||
*/ | ||
@Component({ | ||
selector: 'about-changelog', | ||
templateUrl: './changelog.component.html', | ||
styleUrls: ['./changelog.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class ChangelogComponent {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters