mirror of
https://github.com/Spythere/genera-tor.git
synced 2026-05-04 22:18:13 +00:00
chore: restored location autofill
This commit is contained in:
@@ -55,17 +55,6 @@
|
|||||||
{{ cp }}
|
{{ cp }}
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<label for="fill-checkpoint" class="g-checkbox">
|
|
||||||
<input
|
|
||||||
type="checkbox"
|
|
||||||
name="fill-checkpoint"
|
|
||||||
id="fill-checkpoint"
|
|
||||||
v-model="autofillCheckpointName"
|
|
||||||
@change="onAutofillChange()"
|
|
||||||
/>
|
|
||||||
<span> {{ $t('order-train-picker.autofill-checkpoint-id') }}</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
@@ -131,10 +120,7 @@ const selectedSceneryId = ref<string | null>(null);
|
|||||||
const selectedCheckpointName = ref<string | null>(null);
|
const selectedCheckpointName = ref<string | null>(null);
|
||||||
const selectedRegion = ref('eu');
|
const selectedRegion = ref('eu');
|
||||||
|
|
||||||
const autofillCheckpointName = ref(false);
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
autofillCheckpointName.value = StorageManager.getBooleanValue('fill-checkpoint');
|
|
||||||
fetchSceneriesData();
|
fetchSceneriesData();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -223,10 +209,6 @@ function selectCheckpointOption() {
|
|||||||
checkpointNameList.value.length == 0 ? null : checkpointNameList.value[0];
|
checkpointNameList.value.length == 0 ? null : checkpointNameList.value[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
function onAutofillChange() {
|
|
||||||
StorageManager.setBooleanValue('fill-checkpoint', autofillCheckpointName.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
function fillOrderData(train: API.ActiveTrains.Data) {
|
function fillOrderData(train: API.ActiveTrains.Data) {
|
||||||
if (!selectedScenery.value) return;
|
if (!selectedScenery.value) return;
|
||||||
|
|
||||||
@@ -234,7 +216,7 @@ function fillOrderData(train: API.ActiveTrains.Data) {
|
|||||||
|
|
||||||
store.orderData.header.A = train.trainNo.toString();
|
store.orderData.header.A = train.trainNo.toString();
|
||||||
store.orderData.header.C = train.currentStationName;
|
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.V = train.driverName;
|
||||||
store.orderData.footer.W = scenery.dispatcherName;
|
store.orderData.footer.W = scenery.dispatcherName;
|
||||||
|
|||||||
+2
-2
@@ -82,9 +82,9 @@
|
|||||||
"A-placeholder": "Train / shunting composition number",
|
"A-placeholder": "Train / shunting composition number",
|
||||||
"B": "B Date",
|
"B": "B Date",
|
||||||
"C": "C Location of train {'|'} Location of shunting composition",
|
"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": "D Location of issuer",
|
||||||
"D-placeholder": "Post name"
|
"D-placeholder": "Name of the post / scenery"
|
||||||
},
|
},
|
||||||
"22": {
|
"22": {
|
||||||
"text": "Applies to left-track traffic",
|
"text": "Applies to left-track traffic",
|
||||||
|
|||||||
+2
-2
@@ -82,9 +82,9 @@
|
|||||||
"A-placeholder": "Numer pociągu lub manewru",
|
"A-placeholder": "Numer pociągu lub manewru",
|
||||||
"B": "B Data",
|
"B": "B Data",
|
||||||
"C": "C Lokalizacja pociągu {'|'} składu manewrowego",
|
"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": "D Lokalizacja nadawcy",
|
||||||
"D-placeholder": "Nazwa posterunku"
|
"D-placeholder": "Nazwa posterunku / scenerii"
|
||||||
},
|
},
|
||||||
"22": {
|
"22": {
|
||||||
"text": "Dotyczy jazdy torem lewym",
|
"text": "Dotyczy jazdy torem lewym",
|
||||||
|
|||||||
Reference in New Issue
Block a user