aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src/views/PlayView.vue
diff options
context:
space:
mode:
authorRemy Raes <raes.remy@gmail.com>2022-09-25 00:49:43 +0200
committerRemy Raes <raes.remy@gmail.com>2022-09-25 00:49:43 +0200
commitb78ab195890dab262531d2f82f33b7d137726d13 (patch)
tree07930872e55208f029ac8fd6f742f24666364071 /src-vue/src/views/PlayView.vue
parent8b96f540dd5b8549f737df74e9d5a8e52ff15c70 (diff)
downloadFlightCore-b78ab195890dab262531d2f82f33b7d137726d13.tar.gz
FlightCore-b78ab195890dab262531d2f82f33b7d137726d13.zip
play button is disabled when game is running
Diffstat (limited to 'src-vue/src/views/PlayView.vue')
-rw-r--r--src-vue/src/views/PlayView.vue17
1 files changed, 15 insertions, 2 deletions
diff --git a/src-vue/src/views/PlayView.vue b/src-vue/src/views/PlayView.vue
index 28458b4f..2ac21ba4 100644
--- a/src-vue/src/views/PlayView.vue
+++ b/src-vue/src/views/PlayView.vue
@@ -8,6 +8,11 @@ export default {
developerModeClicks: 0
}
},
+ computed: {
+ northstarIsRunning(): boolean {
+ return this.$store.state.northstar_is_running;
+ }
+ },
methods: {
activateDeveloperMode() {
this.developerModeClicks += 1;
@@ -41,11 +46,13 @@ export default {
</div>
</div>
<div>
- <el-button type="primary" size="large">Launch game</el-button>
+ <el-button :disabled="northstarIsRunning" type="primary" size="large" class="fc_launch__button">
+ {{ northstarIsRunning ? "Game is running" : "Launch game" }}
+ </el-button>
<div v-if="$store.state.developer_mode" id="fc_services__status">
<div>
<div class="fc_version__line">Northstar is running: </div>
- <div class="fc_version__line fc_version__line__boolean"> {{ $store.state.northstar_is_running }}</div>
+ <div class="fc_version__line fc_version__line__boolean"> {{ northstarIsRunning }}</div>
</div>
<div>
<div class="fc_version__line">Origin is running: </div>
@@ -95,6 +102,12 @@ button {
}
+.fc_launch__button:focus {
+ background-color: var(--el-color-primary);
+ border-color: var(--el-color-primary);
+}
+
+
#fc_services__status {
display: inline-block;
position: fixed;