aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src/plugins
diff options
context:
space:
mode:
authorAlystrasz <contact@remyraes.com>2022-09-26 23:13:21 +0200
committerAlystrasz <contact@remyraes.com>2022-09-26 23:13:21 +0200
commitea94dd382d3ef759b83350ddf51eecf121eab18f (patch)
treef7d947373b35045c92275931a23d038b09367508 /src-vue/src/plugins
parenta930c0342a584b4e74566a354876585b02635bed (diff)
downloadFlightCore-ea94dd382d3ef759b83350ddf51eecf121eab18f.tar.gz
FlightCore-ea94dd382d3ef759b83350ddf51eecf121eab18f.zip
feat: game cannot be launched if Origin is not running
Diffstat (limited to 'src-vue/src/plugins')
-rw-r--r--src-vue/src/plugins/store.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts
index 2d4b5684..14b96415 100644
--- a/src-vue/src/plugins/store.ts
+++ b/src-vue/src/plugins/store.ts
@@ -4,6 +4,7 @@ import {Tabs} from "../utils/Tabs";
import {invoke} from "@tauri-apps/api";
import {GameInstall} from "../utils/GameInstall";
import {ReleaseCanal} from "../utils/ReleaseCanal";
+import { ElNotification } from 'element-plus';
export const store = createStore({
state () {
@@ -34,6 +35,21 @@ export const store = createStore({
},
updateCurrentTab(state: any, newTab: Tabs) {
state.current_tab = newTab;
+ },
+ launchGame(state: any) {
+ // TODO update installation if release track was switched
+ // TODO install northstar if it wasn't detected
+ // Show an error message if Origin is not running.
+ if (!state.origin_is_running) {
+ ElNotification({
+ title: 'Origin is not running',
+ message: "Northstar cannot launch while you're not authenticated with Origin.",
+ type: 'warning',
+ position: 'bottom-right'
+ });
+ }
+
+ // TODO launch game
}
}
});