aboutsummaryrefslogtreecommitdiff
path: root/src-vue
diff options
context:
space:
mode:
Diffstat (limited to 'src-vue')
-rw-r--r--src-vue/src/components/PlayButton.vue3
-rw-r--r--src-vue/src/main.ts2
-rw-r--r--src-vue/src/plugins/store.ts5
-rw-r--r--src-vue/src/views/PlayView.vue5
-rw-r--r--src-vue/src/views/SettingsView.vue2
-rw-r--r--src-vue/vuex-shim.d.ts13
6 files changed, 23 insertions, 7 deletions
diff --git a/src-vue/src/components/PlayButton.vue b/src-vue/src/components/PlayButton.vue
index f465fb39..d3176d87 100644
--- a/src-vue/src/components/PlayButton.vue
+++ b/src-vue/src/components/PlayButton.vue
@@ -22,7 +22,7 @@ export default {
case NorthstarState.READY_TO_PLAY:
return "Launch game";
- default:
+ default:
return "";
}
},
@@ -33,6 +33,7 @@ export default {
return Object.keys(ReleaseCanal).map(function (v) {
return {
key: v,
+ // @ts-ignore
value: ReleaseCanal[v]
}
});
diff --git a/src-vue/src/main.ts b/src-vue/src/main.ts
index d13ef719..0ac31a2d 100644
--- a/src-vue/src/main.ts
+++ b/src-vue/src/main.ts
@@ -18,6 +18,6 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
}
// style
-app.use( store );
+app.use( store, '$store' );
app.mount('#app')
diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts
index 87c8921f..67856b47 100644
--- a/src-vue/src/plugins/store.ts
+++ b/src-vue/src/plugins/store.ts
@@ -118,6 +118,7 @@ export const store = createStore({
* It invokes all Rust methods that are needed to initialize UI.
*/
async function _initializeApp(state: any) {
+ // @ts-ignore
const result: GameInstall = await invoke("find_game_install_location_caller")
.catch((err) => {
// Gamepath not found or other error
@@ -154,7 +155,7 @@ function _initializeListeners(state: any) {
}
/**
- * This retrieves Northstar version tag, and stores it in application
+ * This retrieves Northstar version tag, and stores it in application
* state, for it to be displayed in UI.
*/
async function _get_northstar_version_number(state: any) {
@@ -167,7 +168,7 @@ async function _get_northstar_version_number(state: any) {
.then((message) => {
if (message) {
state.northstar_state = NorthstarState.MUST_UPDATE;
- }
+ }
})
.catch((error) => {
console.error(error);
diff --git a/src-vue/src/views/PlayView.vue b/src-vue/src/views/PlayView.vue
index 3ca47e22..64779f6a 100644
--- a/src-vue/src/views/PlayView.vue
+++ b/src-vue/src/views/PlayView.vue
@@ -2,8 +2,9 @@
import { ElNotification } from 'element-plus';
import {Tabs} from "../utils/Tabs";
import PlayButton from '../components/PlayButton.vue';
+import { defineComponent } from "vue";
-export default {
+export default defineComponent({
data() {
return {
developerModeClicks: 0
@@ -39,7 +40,7 @@ export default {
this.$store.commit('updateCurrentTab', Tabs.CHANGELOG);
}
}
-};
+});
</script>
<template>
diff --git a/src-vue/src/views/SettingsView.vue b/src-vue/src/views/SettingsView.vue
index da81dc8a..e0ffc026 100644
--- a/src-vue/src/views/SettingsView.vue
+++ b/src-vue/src/views/SettingsView.vue
@@ -26,7 +26,7 @@ export default {
}
},
mounted() {
- document.querySelector('input').disabled = true;
+ document.querySelector('input')!.disabled = true;
}
}
</script>
diff --git a/src-vue/vuex-shim.d.ts b/src-vue/vuex-shim.d.ts
new file mode 100644
index 00000000..cebc5ce8
--- /dev/null
+++ b/src-vue/vuex-shim.d.ts
@@ -0,0 +1,13 @@
+import { ComponentCustomProperties } from 'vue'
+import { Store } from 'vuex'
+
+declare module '@vue/runtime-core' {
+ // Declare your own store states.
+ interface State {
+ count: number
+ }
+
+ interface ComponentCustomProperties {
+ $store: Store<State>
+ }
+}