Skip to content

Commit

Permalink
Split product version and commit revision hash on footer.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseldredge committed Dec 9, 2015
1 parent 6e60141 commit 9d66f9d
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 1 deletion.
12 changes: 12 additions & 0 deletions app/controllers/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ export default Ember.Controller.extend(BaseControllerMixin, {

apiURL: Ember.computed.oneWay('restClient.apiURL'),

productVersion: Ember.computed('application.version', function() {
return this.get('application.version').split('+')[0];
}),

productRevisionHash: Ember.computed('application.version', function() {
var parts = this.get('application.version').split('+');
if (parts.length === 2) {
return parts[1];
}
return undefined;
}),

actions: {
search: function () {
var query = this.get('searchBox');
Expand Down
4 changes: 4 additions & 0 deletions app/styles/_kl-text.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.kl-span--low-importance {
color: $text-low-importance-color;
font-size: $text-low-importance-font-size;
}
3 changes: 3 additions & 0 deletions app/styles/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ $link-color: $blue;
$button-font-weight: normal;

$pre-background-color: $silver;

$text-low-importance-color: #aaa;
$text-low-importance-font-size: smaller;
1 change: 1 addition & 0 deletions app/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
@import 'kl-dropdown';
@import 'kl-progress';
@import 'kl-table';
@import 'kl-text';

// Additional Utilities
@import 'kl-white-space';
6 changes: 5 additions & 1 deletion app/templates/application.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@
</li>
{{/with}}
<li class="inline-block h5">
<strong>Klondike:</strong> {{application.version}}
<strong>Klondike:</strong>
{{productVersion}}
{{#if productRevisionHash}}
<span class="kl-span--low-importance">({{productRevisionHash}})</span>
{{/if}}
</li>
</ul>
</div>
Expand Down

0 comments on commit 9d66f9d

Please sign in to comment.