chore(scenery): added saving showing thumbnails state to local storage

This commit is contained in:
2026-03-15 23:06:27 +01:00
parent 5e31948a5d
commit dc0b0315e0
@@ -30,6 +30,7 @@ import { useMainStore } from '../../store/mainStore';
import { useApiStore } from '../../store/apiStore';
import { ActiveScenery, Station } from '../../typings/common';
import SceneryTimetableList from './SceneryTimetable/SceneryTimetableList.vue';
import StorageManager from '../../managers/storageManager';
export default defineComponent({
name: 'SceneryTimetable',
@@ -54,6 +55,7 @@ export default defineComponent({
activated() {
this.loadSelectedOption();
this.handleStockThumbnails();
},
watch: {
@@ -88,6 +90,8 @@ export default defineComponent({
methods: {
toggleThumbnails() {
this.showStockThumbnails = !this.showStockThumbnails;
StorageManager.setBooleanValue('showStockThumbnails', this.showStockThumbnails);
},
loadSelectedOption() {
@@ -115,6 +119,12 @@ export default defineComponent({
checkpointsListRef[0] ??
sceneryName;
}
},
handleStockThumbnails() {
const storageVal = StorageManager.getBooleanValue('showStockThumbnails');
this.showStockThumbnails = storageVal;
}
}
});