From 3713289339414f57f81fb37977749ae333fc88a9 Mon Sep 17 00:00:00 2001 From: Spythere Date: Sun, 12 Oct 2025 00:25:15 +0200 Subject: [PATCH] chore: restored location autofill --- .../Panels/OrderTrainPickerPanel.vue | 20 +------------------ src/locales/en.json | 4 ++-- src/locales/pl.json | 4 ++-- 3 files changed, 5 insertions(+), 23 deletions(-) diff --git a/src/components/Panels/OrderTrainPickerPanel.vue b/src/components/Panels/OrderTrainPickerPanel.vue index aa85c18..e05fee6 100644 --- a/src/components/Panels/OrderTrainPickerPanel.vue +++ b/src/components/Panels/OrderTrainPickerPanel.vue @@ -55,17 +55,6 @@ {{ cp }} - -
@@ -131,10 +120,7 @@ const selectedSceneryId = ref(null); const selectedCheckpointName = ref(null); const selectedRegion = ref('eu'); -const autofillCheckpointName = ref(false); - onMounted(() => { - autofillCheckpointName.value = StorageManager.getBooleanValue('fill-checkpoint'); fetchSceneriesData(); }); @@ -223,10 +209,6 @@ function selectCheckpointOption() { checkpointNameList.value.length == 0 ? null : checkpointNameList.value[0]; } -function onAutofillChange() { - StorageManager.setBooleanValue('fill-checkpoint', autofillCheckpointName.value); -} - function fillOrderData(train: API.ActiveTrains.Data) { if (!selectedScenery.value) return; @@ -234,7 +216,7 @@ function fillOrderData(train: API.ActiveTrains.Data) { store.orderData.header.A = train.trainNo.toString(); store.orderData.header.C = train.currentStationName; - store.orderData.header.D = scenery.stationName; + store.orderData.header.D = selectedCheckpointName.value || scenery.stationName; store.orderData.footer.V = train.driverName; store.orderData.footer.W = scenery.dispatcherName; diff --git a/src/locales/en.json b/src/locales/en.json index 23e3274..6bf2d16 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -82,9 +82,9 @@ "A-placeholder": "Train / shunting composition number", "B": "B Date", "C": "C Location of train {'|'} Location of shunting composition", - "C-placeholder": "Line or post name", + "C-placeholder": "Name of the post / line / scenery", "D": "D Location of issuer", - "D-placeholder": "Post name" + "D-placeholder": "Name of the post / scenery" }, "22": { "text": "Applies to left-track traffic", diff --git a/src/locales/pl.json b/src/locales/pl.json index 249e36c..e92c817 100644 --- a/src/locales/pl.json +++ b/src/locales/pl.json @@ -82,9 +82,9 @@ "A-placeholder": "Numer pociągu lub manewru", "B": "B Data", "C": "C Lokalizacja pociągu {'|'} składu manewrowego", - "C-placeholder": "Nazwa posterunku lub szlaku", + "C-placeholder": "Nazwa posterunku / szlaku / scenerii", "D": "D Lokalizacja nadawcy", - "D-placeholder": "Nazwa posterunku" + "D-placeholder": "Nazwa posterunku / scenerii" }, "22": { "text": "Dotyczy jazdy torem lewym",