diff --git a/src/App.vue b/src/App.vue
index 9abeb431e..c874442f7 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -54,7 +54,14 @@
Mission configuration
-
+
+
+
diff --git a/src/stores/mission.ts b/src/stores/mission.ts
index 23cc3366a..7742229bf 100644
--- a/src/stores/mission.ts
+++ b/src/stores/mission.ts
@@ -1,13 +1,16 @@
import { useStorage } from '@vueuse/core'
import { defineStore } from 'pinia'
-import { reactive, ref } from 'vue'
+import { reactive, ref, watch } from 'vue'
import type { Waypoint, WaypointCoordinates } from '@/types/mission'
export const useMissionStore = defineStore('mission', () => {
const missionName = ref('')
+ const lastMissionName = useStorage('cockpit-last-mission-name', '')
const missionStartTime = useStorage('cockpit-mission-start-time', new Date())
+ watch(missionName, () => (lastMissionName.value = missionName.value))
+
const currentPlanningWaypoints = reactive([])
const moveWaypoint = (id: string, newCoordinates: WaypointCoordinates): void => {
@@ -21,5 +24,5 @@ export const useMissionStore = defineStore('mission', () => {
)
}
- return { missionName, missionStartTime, currentPlanningWaypoints, moveWaypoint }
+ return { missionName, lastMissionName, missionStartTime, currentPlanningWaypoints, moveWaypoint }
})