diff options
author | Alystrasz <contact@remyraes.com> | 2022-09-29 08:29:37 +0200 |
---|---|---|
committer | Alystrasz <contact@remyraes.com> | 2022-09-29 08:29:37 +0200 |
commit | 9a4c8f4cdb580d2ec3cdd4852f56e86dfe6000e9 (patch) | |
tree | 998609cc56d1d0fd0e97c14d093fb21cfceb12c3 | |
parent | 518efdc3526cb8f4ced764beb85bfac145a1b459 (diff) | |
download | FlightCore-9a4c8f4cdb580d2ec3cdd4852f56e86dfe6000e9.tar.gz FlightCore-9a4c8f4cdb580d2ec3cdd4852f56e86dfe6000e9.zip |
feat: add basic canal selector
-rw-r--r-- | src-vue/src/components/PlayButton.vue | 22 | ||||
-rw-r--r-- | src-vue/src/plugins/store.ts | 1 |
2 files changed, 23 insertions, 0 deletions
diff --git a/src-vue/src/components/PlayButton.vue b/src-vue/src/components/PlayButton.vue index 0cb75c94..cc6eb9f2 100644 --- a/src-vue/src/components/PlayButton.vue +++ b/src-vue/src/components/PlayButton.vue @@ -1,5 +1,6 @@ <script lang="ts"> import { NorthstarState } from '../utils/NorthstarState'; +import { ReleaseCanal } from '../utils/ReleaseCanal'; export default { name: 'PlayButton', @@ -25,6 +26,14 @@ export default { default: return ""; } + }, + options(): {key: string, value: string}[] { + return Object.keys(ReleaseCanal).map(function (v) { + return { + key: v, + value: ReleaseCanal[v] + } + }); } }, methods: { @@ -39,6 +48,19 @@ export default { <el-button :disabled="northstarIsRunning" type="primary" size="large" @click="launchGame" class="fc_launch__button"> {{ playButtonLabel }} </el-button> + <el-select + v-model="$store.state.release_canal" + filterable + placeholder="Select release canal" + style="width: 240px" + > + <el-option + v-for="item in options" + :key="item.key" + :label="item.value" + :value="item.value" + /> + </el-select> </template> <style scoped> diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts index 6ed0b522..1ee3bfff 100644 --- a/src-vue/src/plugins/store.ts +++ b/src-vue/src/plugins/store.ts @@ -16,6 +16,7 @@ export const store = createStore({ installed_northstar_version: "", northstar_state: NorthstarState.INSTALL, + release_canal: ReleaseCanal.RELEASE, northstar_is_running: false, origin_is_running: false |