aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src/views
diff options
context:
space:
mode:
authorAlystrasz <contact@remyraes.com>2022-09-27 23:33:17 +0200
committerAlystrasz <contact@remyraes.com>2022-09-27 23:33:17 +0200
commit238e340ffb4d1af175e29567a772a0790174fdff (patch)
tree1445782e43d3c81978ab3a8e415996c3428b7f2c /src-vue/src/views
parentb4531b34ca5232aadfa2cebaa1c26c66fbaea4cd (diff)
downloadFlightCore-238e340ffb4d1af175e29567a772a0790174fdff.tar.gz
FlightCore-238e340ffb4d1af175e29567a772a0790174fdff.zip
feat: we can now install Northstar if it wasn't detected
Diffstat (limited to 'src-vue/src/views')
-rw-r--r--src-vue/src/views/PlayView.vue21
1 files changed, 20 insertions, 1 deletions
diff --git a/src-vue/src/views/PlayView.vue b/src-vue/src/views/PlayView.vue
index 02d59b15..03f54936 100644
--- a/src-vue/src/views/PlayView.vue
+++ b/src-vue/src/views/PlayView.vue
@@ -1,5 +1,6 @@
<script lang="ts">
import { ElNotification } from 'element-plus';
+import { NorthstarState } from '../utils/NorthstarState';
import {Tabs} from "../utils/Tabs";
export default {
@@ -14,6 +15,24 @@ export default {
},
northstarVersion(): string {
return this.$store.state.installed_northstar_version;
+ },
+ playButtonLabel(): string {
+ if (this.$store.state.northstar_is_running) {
+ return "Game is running";
+ }
+
+ switch(this.$store.state.northstar_state) {
+ case NorthstarState.INSTALL:
+ return "Install";
+ case NorthstarState.INSTALLING:
+ return "Installing..."
+ case NorthstarState.MUST_UPDATE:
+ return "Update";
+ case NorthstarState.UPDATING:
+ return "Updating...";
+ case NorthstarState.READY_TO_PLAY:
+ return "Launch game";
+ }
}
},
methods: {
@@ -55,7 +74,7 @@ export default {
</div>
<div>
<el-button :disabled="northstarIsRunning" type="primary" size="large" @click="launchGame" class="fc_launch__button">
- {{ northstarIsRunning ? "Game is running" : "Launch game" }}
+ {{ playButtonLabel }}
</el-button>
<div v-if="$store.state.developer_mode" id="fc_services__status">
<div>