Skip to content

Commit

Permalink
fix server state buttons and add popup for ps4 ip
Browse files Browse the repository at this point in the history
  • Loading branch information
Gkiokan committed Apr 27, 2022
1 parent b733d38 commit 3f6fadf
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
26 changes: 24 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export default defineComponent({
startUpReset(){
this.updateServerState(null, null)
this.updateServerFiles(null, [])
// this.state = 'stopped'
this.logs = []
},
Expand Down Expand Up @@ -66,7 +67,7 @@ export default defineComponent({
},
storeSubscriber(mutation, state){
console.log(mutation)
// console.log(mutation)
localStorage.setItem('store', JSON.stringify(state));
},
Expand All @@ -80,8 +81,29 @@ export default defineComponent({
updatePS4IP(_, ip=''){
this.addLogs("Request from ps4 ip " + ip)
if(!this.ps4ip)
this.ps4ip = ip
this.$q.dialog({
title: "Found a PS4!",
message: "Your ps4 HB-Store just connected, wanna add it's IP?",
dark: true,
cancel: {
flat: true,
color: 'black',
textColor: 'white',
label: "No, leave my PS4 IP"
},
ok: {
flat: true,
label: "Yea sure, add it!",
color: 'transparent',
textColor: 'green',
icon: 'done',
},
}).onOk( () => {
this.ps4ip = ip
})
},
showError(message){
Expand Down
2 changes: 1 addition & 1 deletion src/components/Config.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<q-btn class="full-width q-mb-md" :color="getServerStateColor" :label="getServerStateLabel" />

<div class='q-gutter-md space-around'>
<q-btn outline icon="play_arrow" color="green-8" label="Start" @click="$root.startServer" :disable="!state || state != 'stopped'" />
<q-btn outline icon="play_arrow" color="green-8" label="Start" @click="$root.startServer" :disable="state != null | state != 'stopped'" />
<q-btn outline icon="restart_alt" color="orange-8" label="Restart" @click="$root.restartServer" :disable="state != 'running'" />
<q-btn outline icon="stop" color="red-8" label="Stop" @click="$root.stopServer" :disable="state != 'running'" />
</div>
Expand Down

0 comments on commit 3f6fadf

Please sign in to comment.