Permalink
Browse files

feat(version): display abstruse version in header dropdown

  • Loading branch information...
jkuri committed Oct 3, 2017
1 parent 7257f24 commit 13fe0aaa3c0a156edb97b17e990921bc02832170
@@ -288,7 +288,8 @@ export class AppBuildDetailsComponent implements OnInit, OnDestroy {
} else if (this.build.data.head_commit) {
const commit = this.build.data.head_commit;
this.committerAvatar = this.build.data.sender.avatar_url;
this.nameCommitter = this.build.data.head_commit.author.name;
this.nameAuthor = this.build.data.head_commit.author.name;
this.nameCommitter = this.build.data.head_commit.committer.name;

if (commit.author.username !== commit.committer.username) {
this.nameCommitter = commit.committer.name;
@@ -48,6 +48,10 @@
<a class="nav-dropdown-item" (click)="logout()">
Logout
</a>
<a class="version-link" href="https://github.com/bleenco/abstruse" target="_blank">
Abstruse {{ version }}
<i class="ionicon ion-social-github"></i>
</a>
</div>
</a>

@@ -4,6 +4,7 @@ import { AuthService } from '../../services/auth.service';
import { ConfigService } from '../../services/config.service';
import { SocketService } from '../../services/socket.service';
import { NotificationService, NotificationType } from '../../services/notification.service';
const pkgJson = require('../../../../package.json');

@Component({
selector: 'app-header',
@@ -14,6 +15,7 @@ export class AppHeaderComponent implements OnInit {
notifyDropped: boolean;
user: any;
notifications: NotificationType[];
version: string;

constructor(
private authService: AuthService,
@@ -30,6 +32,7 @@ export class AppHeaderComponent implements OnInit {
});

this.notifications = [];
this.version = pkgJson.version;
}

ngOnInit() {
@@ -229,7 +229,8 @@ export class AppJobComponent implements OnInit, OnDestroy {
} else if (this.job.build.data.head_commit) {
const commit = this.job.build.data.head_commit;
this.committerAvatar = this.job.build.data.sender.avatar_url;
this.nameCommitter = this.job.build.data.head_commit.author.name;
this.nameAuthor = this.job.build.data.head_commit.author.name;
this.nameCommitter = this.job.build.data.head_commit.committer.name;

if (commit.author.username !== commit.committer.username) {
this.nameCommitter = commit.committer.name;
@@ -180,6 +180,21 @@
background: $background
color: $color

.version-link
font-size: 10px
color: $grey-light
padding: 5px 10px
position: relative
display: block
text-align: center

i
position: absolute
font-size: 14px !important
top: 0
right: 0
color: $grey-light

&.sub-nav
background: transparent
padding-top: 40px
@@ -14,7 +14,8 @@
"outDir": "lib",
"typeRoots": [
"../node_modules/@types"
]
],
"types": ["node"]
},
"exclude": [
"main.aot.ts",

0 comments on commit 13fe0aa

Please sign in to comment.