-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved updater to angular app, integrating it better
- Loading branch information
Showing
27 changed files
with
303 additions
and
121 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
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
import { UpdaterService } from './updater.service'; | ||
@Component({ | ||
selector: 'pokemon-root', | ||
templateUrl: './app.component.html', | ||
styleUrls: ['./app.component.css'] | ||
}) | ||
export class AppComponent { | ||
|
||
constructor(private updaterService: UpdaterService) { } | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
h4 { | ||
margin-top: 0; | ||
} |
12 changes: 12 additions & 0 deletions
12
client/src/app/dialog/update-available-dialog.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,12 @@ | ||
<div> | ||
<h3 class='mdl-dialog__title'>Version {{ updateInfo.version }} is now available</h3> | ||
<div class='mdl-dialog__content'> | ||
<h4>Release notes:</h4> | ||
<p [innerHTML]='updateInfo.releaseNotes'></p> | ||
</div> | ||
<div class='mdl-dialog__actions'> | ||
<button mdl-button (click)='doUpdate()' mdl-button-type='raised' mdl-colored='primary' mdl-ripple>Update</button> | ||
<mdl-layout-spacer></mdl-layout-spacer> | ||
<button mdl-button (click)='dismissUpdate()' mdl-button-type='raised' mdl-ripple>Not now</button> | ||
</div> | ||
</div> |
28 changes: 28 additions & 0 deletions
28
client/src/app/dialog/update-available-dialog.component.ts
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,28 @@ | ||
import { Component, Inject } from '@angular/core'; | ||
import { MdlDialogReference } from '@angular-mdl/core'; | ||
|
||
import { UpdateInfo } from '../models/update-info.interface'; | ||
import { UPDATE_INFO } from '../models/update-info.token'; | ||
|
||
@Component({ | ||
selector: 'pokemon-update-available-dialog-component', | ||
templateUrl: './update-available-dialog.component.html', | ||
styleUrls: ['./update-available-dialog.component.css'] | ||
}) | ||
export class UpdateAvailableDialogComponent { | ||
public updateInfo: UpdateInfo; | ||
|
||
constructor( | ||
@Inject(UPDATE_INFO) updateInfo: UpdateInfo, | ||
private dialog: MdlDialogReference) { | ||
this.updateInfo = updateInfo; | ||
} | ||
|
||
public dismissUpdate(): void { | ||
this.dialog.hide(false); | ||
} | ||
|
||
public doUpdate(): void { | ||
this.dialog.hide(true); | ||
} | ||
} |
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
Oops, something went wrong.