Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/justkowal/FGCompanion
Browse files Browse the repository at this point in the history
  • Loading branch information
justkowal committed Oct 27, 2021
2 parents 86942e0 + 2974c38 commit 7750ac7
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
15 changes: 12 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,15 @@
</ul>
</div>
<div id="tab1" class="col s12">
<div class="center">
<h3>Nothing is there yet.</h3>
<h5>General Settings</h5>
<label for="showRepoButton">Show repo ads (tysm for turning on)</label>
<div class="switch">
<label>
Off
<input id="showRepoButton" type="checkbox">
<span class="lever"></span>
On
</label>
</div>
</div>
<div id="tab2" class="col s12">
Expand Down Expand Up @@ -113,6 +120,7 @@ <h3>Nothing is there yet.</h3>
document.getElementById('statePatternRoute').value = settings.statePatternRoute
document.getElementById('detailsPatternRoute').value = settings.detailsPatternRoute
document.getElementById('rpcautooff').checked = settings.autoOffRPC
document.getElementById('showRepoButton').checked = settings.showRepoButton
})
api.recieve('save-settings-reply',(arg)=>{
if(arg == "ok"){
Expand All @@ -127,7 +135,8 @@ <h3>Nothing is there yet.</h3>
detailsPattern: document.getElementById('detailsPattern').value,
statePatternRoute: document.getElementById('statePatternRoute').value,
detailsPatternRoute: document.getElementById('detailsPatternRoute').value,
autoOffRPC: document.getElementById('rpcautooff').checked
autoOffRPC: document.getElementById('rpcautooff').checked,
showRepoButton: document.getElementById('showRepoButton').checked
})

}
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ app.whenReady().then(() => {
smallImageKey: "paint",
smallImageText: info.paintjobtext,
buttons : [
{label : "🐱‍💻Github Repo" , url : "https://github.com/justkowal/FGCompanion"},
(settings.properties.showRepoButton) ? {label : "🐱‍💻Github Repo" , url : "https://github.com/justkowal/FGCompanion"} : undefined ,
],
instance: true,
})
Expand All @@ -146,7 +146,7 @@ app.whenReady().then(() => {
smallImageKey: "paint",
smallImageText: info.paintjobtext,
buttons : [
{label : "🐱‍💻Github Repo" , url : "https://github.com/justkowal/FGCompanion"},
(settings.properties.showRepoButton) ? {label : "🐱‍💻Github Repo" , url : "https://github.com/justkowal/FGCompanion"} : undefined ,
],
instance: true,
})
Expand Down
9 changes: 4 additions & 5 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion settings.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"statePattern":"SPD: {airspeed} kt | ALT: {alt} ft","detailsPattern":"Flying over {airspace} {emoji}","statePatternRoute":"SPD: {airspeed} kt | ALT: {alt} ft","detailsPatternRoute":"Flying from {depicao} to {desticao}","autoOffRPC":true}
{"statePattern":"SPD: {airspeed} kt | ALT: {alt} ft","detailsPattern":"Flying over {airspace} {emoji}","statePatternRoute":"SPD: {airspeed} kt | ALT: {alt} ft","detailsPatternRoute":"Flying from {depicao} to {desticao}","autoOffRPC":true,"showRepoButton":false}

0 comments on commit 7750ac7

Please sign in to comment.