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

Update #8

Merged
merged 9 commits into from
Feb 1, 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
96 changes: 96 additions & 0 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"build": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
"e2e": "ng e2e",
"analyzer": "webpack-bundle-analyzer dist/stats.json"
},
"private": true,
"dependencies": {
Expand Down Expand Up @@ -48,6 +49,7 @@
"protractor": "~5.1.2",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~2.4.2"
"typescript": "~2.4.2",
"webpack-bundle-analyzer": "^2.9.2"
}
}
14 changes: 11 additions & 3 deletions client/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
import { Component } from '@angular/core';
import {Component, OnInit} from '@angular/core';

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'app';
export class AppComponent implements OnInit{

loaded:Boolean = false;
constructor(){

}

ngOnInit(){
this.loaded = true;
}
}
15 changes: 0 additions & 15 deletions client/src/app/common/admin-guard.service.spec.ts

This file was deleted.

15 changes: 0 additions & 15 deletions client/src/app/service/activity.service.spec.ts

This file was deleted.

15 changes: 0 additions & 15 deletions client/src/app/service/auth.service.spec.ts

This file was deleted.

15 changes: 0 additions & 15 deletions client/src/app/service/funding.service.spec.ts

This file was deleted.

15 changes: 0 additions & 15 deletions client/src/app/service/version.service.spec.ts

This file was deleted.

7 changes: 4 additions & 3 deletions client/src/app/service/version.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Injectable } from '@angular/core';
import {Http} from "@angular/http";
import {environment} from "../../environments/environment";

@Injectable()
export class VersionService {
Expand All @@ -10,13 +11,13 @@ export class VersionService {

getLatestCommit(){
return this.http
.get('https://api.github.com/repos/ssysm/starrysea-nextgen/commits/')
.get(environment.apiBase+'/version/latest/commit')

}

getVersion(){
getLatestVersion(){
return this.http
.get('https://api.github.com/repos/ssysm/starrysea-nextgen/releases')
.get(environment.apiBase+'/version/latest/version')
}

}
15 changes: 0 additions & 15 deletions client/src/app/service/work.service.spec.ts

This file was deleted.

7 changes: 4 additions & 3 deletions client/src/app/view/about/about.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ <h1 class="text-center introh1 h1">关于我们</h1>
</blockquote>
<div class="row" id="sysInfo">
<div class="col-sm-12">
<h3>系统版本号: <span class="badge badge-success">v1.0.3</span></h3>
<p class="h5">Latest System Releases: <span class="badge badge-success">{{Version}}</span></p>
<div style="display: inline">
<p style="display: inline">前端: <span class="badge badge-success">v1.0.3</span></p>
<p style="display: inline">后端: <span class="badge badge-success">v1.0.2</span></p>
<p style="display: inline">Front-End: <span class="badge badge-success">v1.0.3</span></p>
<p style="display: inline">Back-End: <span class="badge badge-success">v1.0.3</span></p>
<p>Latest Commit: <span class="badge badge-info">{{commit}}</span></p>
</div>
</div>
</div>
Expand Down
20 changes: 20 additions & 0 deletions client/src/app/view/about/about.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,26 @@ export class AboutComponent implements OnInit {
commit:any;
Version:string;
ngOnInit() {
this.versionService.getLatestCommit()
.subscribe(data=>{
if(data.json().success){
this.commit = data.json().response.commit;
}else{
this.commit = "N/A"
}
},(error)=>{
this.commit = "N/A"
});
this.versionService.getLatestVersion()
.subscribe(data=>{
if(data.json().success){
this.Version = data.json().response.tag_name
}else{
this.Version = "N/A"
}
},(error)=>{
this.Version = "N/A"
})
}

}
2 changes: 1 addition & 1 deletion client/src/app/view/home/home.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}

.title{
font-size: 3.8rem;
font-size: 3.5rem;
color:#409cc3;
}

Expand Down
3 changes: 2 additions & 1 deletion client/src/app/view/partical/navbar/navbar.component.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.navbar{
background: url("/assets/img/navbar.jpg") no-repeat fixed;
background-size: contain;
background-size: 100%;
width: 100%;
}

@media screen and (min-width: 991px) {
Expand Down
1 change: 0 additions & 1 deletion client/src/app/view/partical/navbar/navbar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@
</ul>
</div>
</nav>
<router-outlet></router-outlet>
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<div class="container">
<div class="text-center">
<p class="h1 text-thin">404 页面未找到</p>
<p class="h2 text-thin">请稍后重试</p>
<p class="h1 text-thin">404 Page Not Found</p>
<img src="/assets/img/error_dia.png" alt="Error" style="width: 55%;">
<p class="h2 text-thin">Please Try Again Later</p>
</div>
</div>
Binary file added client/src/assets/img/error_dia.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading