mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-04 03:58:11 +00:00
Dodano możliwość wyboru realnych zestawień
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
<template>
|
||||
<ready-stock-list />
|
||||
|
||||
<section class="inputs">
|
||||
<div class="input inputs_loco">
|
||||
<div class="input_container">
|
||||
@@ -40,6 +42,10 @@
|
||||
</button> -->
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button class="btn" @click="setReadyStockList(true)"><b>REALNE ZESTAWIENIA</b></button>
|
||||
</div>
|
||||
|
||||
<div class="input_checkbox">
|
||||
<button @click="onShowSupporterChange" :class="{ checked: this.store.showSupporter }" data-ignore-outside="1">
|
||||
Pokaż tylko pojazdy dla supporterów
|
||||
@@ -117,14 +123,24 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { ICarWagon, ILocomotive, IStore } from '@/types';
|
||||
import { defineComponent, inject } from 'vue';
|
||||
import { defineComponent, inject, provide, ref } from 'vue';
|
||||
|
||||
import ReadyStockList from '@/components/ReadyStockList.vue';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
ReadyStockList,
|
||||
},
|
||||
setup() {
|
||||
const store = inject('Store') as IStore;
|
||||
|
||||
const isReadyStockListOpen = ref(false);
|
||||
|
||||
provide('isReadyStockListOpen', isReadyStockListOpen);
|
||||
|
||||
return {
|
||||
store,
|
||||
isReadyStockListOpen,
|
||||
locoDataList: inject('locoDataList') as ILocomotive[],
|
||||
carDataList: inject('carDataList') as ICarWagon[],
|
||||
isTrainPassenger: inject('isTrainPassenger') as boolean,
|
||||
@@ -224,6 +240,10 @@ export default defineComponent({
|
||||
this.store.swapVehicles = true;
|
||||
},
|
||||
|
||||
setReadyStockList(bool = false) {
|
||||
this.isReadyStockListOpen = bool;
|
||||
},
|
||||
|
||||
onShowSupporterChange() {
|
||||
this.store.showSupporter = !this.store.showSupporter;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user