Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 5d2abe9

Browse files
authored
Merge pull request #1821 from OpenBazaar/showServerVersion
Adds the server version number to the about modal.
2 parents 047dca8 + 998015d commit 5d2abe9

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

js/languages/en-US.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"RemoveModerator": "Remove as Moderator",
4747
"About": "About",
4848
"Version": "Version %{version}",
49+
"ServerVersion": "Server Version %{serverVersion}",
4950
"NoDescriptionAdded": "No description added",
5051
"NoListings": "No listings",
5152
"CoverPhoto": "Cover Photo",

js/templates/aboutModal.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<div class="modal-child modal-childMain custCol-primary">
22
<div class="about-hero modal-hero-about color-secondary-darken custCol-secondary-darken">
33
<div class="modal-hero-icon"></div>
4-
<p class="width100 alignCenter custCol-text marginTop50 textOpacity75 fontSize14"><%= polyglot.t('Version', {version: ob.version}) %></p>
4+
<p class="width100 alignCenter custCol-text marginTop50 row5 textOpacity75 fontSize14"><%= polyglot.t('Version', {version: ob.version}) %></p>
5+
<p class="width100 alignCenter custCol-text marginTop10 textOpacity75 fontSize14"><%= polyglot.t('ServerVersion', {serverVersion: ob.serverVersion}) %></p>
56
</div>
67
<div class="aboutModal-accordion accordion">
78
<div class="accordion-window">
@@ -49,4 +50,4 @@
4950
</div>
5051
</div>
5152
</div>
52-
</div>
53+
</div>

js/views/aboutModal.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ module.exports = baseModal.extend({
2020
throw new Error('Please provide a version.');
2121
}
2222

23+
if (!this.options.serverVersion) {
24+
throw new Error('Please provide a server version.');
25+
}
26+
2327
this._tab = this.options.initialTab;
2428
},
2529

@@ -47,6 +51,7 @@ module.exports = baseModal.extend({
4751
loadTemplate('./js/templates/aboutModal.html', (t) => {
4852
this.$el.html(t({
4953
version: this.options.version,
54+
serverVersion: this.options.serverVersion,
5055
tab: this._tab
5156
}));
5257

js/views/pageNavVw.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,8 @@ module.exports = baseVw.extend({
394394

395395
if (!self.aboutModal) {
396396
self.aboutModal = new AboutModal({
397-
version: pjson.version
397+
version: pjson.version,
398+
serverVersion: self.model.get('version'),
398399
});
399400
self.aboutModal.render();
400401
self.registerChild(self.aboutModal);

0 commit comments

Comments
 (0)