Refactor runtime bootstrap and ship control flows
This commit is contained in:
19
apps/viewer/src/ui/stores/viewerScene.ts
Normal file
19
apps/viewer/src/ui/stores/viewerScene.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { defineStore } from "pinia";
|
||||
import type { PovLevel } from "../../viewerTypes";
|
||||
|
||||
export const useViewerSceneStore = defineStore("viewerScene", {
|
||||
state: () => ({
|
||||
activeSystemId: null as string | null,
|
||||
povLevel: "system" as PovLevel,
|
||||
}),
|
||||
actions: {
|
||||
setViewContext(activeSystemId: string | null, povLevel: PovLevel) {
|
||||
this.activeSystemId = activeSystemId;
|
||||
this.povLevel = povLevel;
|
||||
},
|
||||
reset() {
|
||||
this.activeSystemId = null;
|
||||
this.povLevel = "system";
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user