Skip to content

Commit

Permalink
fix: link client app installation guide from options page
Browse files Browse the repository at this point in the history
  • Loading branch information
dessant committed Sep 13, 2019
1 parent 0db1d75 commit 57611ac
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
15 changes: 13 additions & 2 deletions src/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,20 @@
"description": "Text of the button."
},

"linkText_installGuide": {
"message": "Installation guide",
"description": "Text of the link."
},

"pageContent_optionClientAppDownloadDesc": {
"message": "Download and install the client app to enable user input simulation.",
"description": "Page content."
"message": "Download and install the client app to enable user input simulation. $INSTALLGUIDE$",
"description": "Page content.",
"placeholders": {
"installGuide": {
"content": "$1",
"example": "Installation guide"
}
}
},

"pageContent_optionClientAppOSError": {
Expand Down
7 changes: 5 additions & 2 deletions src/options/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@
</div>

<div class="client-bownload" v-if="showClientAppNotice">
<div class="download-desc">
{{ getText('pageContent_optionClientAppDownloadDesc') }}
<div class="download-desc"
v-html="getText('pageContent_optionClientAppDownloadDesc',
[`<a target='_blank' rel='noreferrer' href='${installGuideUrl}'>${getText('linkText_installGuide')}</a>`])">
</div>
<div class="download-error" v-if="!clientAppDownloadUrl">
{{ getText('pageContent_optionClientAppOSError') }}
Expand Down Expand Up @@ -197,6 +198,7 @@ export default {

showClientAppNotice: false,
clientAppDownloadUrl: '',
installGuideUrl: '',

options: {
speechService: '',
Expand All @@ -223,6 +225,7 @@ export default {
if (!this.clientAppDownloadUrl) {
const {os, arch} = await getPlatform();
if (clientAppPlatforms.includes(`${os}/${arch}`)) {
this.installGuideUrl = `https://github.com/dessant/buster-client/wiki/Installing-the-client-app#${os}`;
this.clientAppDownloadUrl = `https://github.com/dessant/buster-client/releases/download/v${clientAppVersion}/buster-client-setup-v${clientAppVersion}-${os}-${arch}`;
if (os === 'windows') {
this.clientAppDownloadUrl += '.exe';
Expand Down

0 comments on commit 57611ac

Please sign in to comment.