mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-05 22:38:11 +00:00
Hotfix: wiadomość przy braku pociągów do wyświetlenia
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
<template>
|
||||
<div class="train-table">
|
||||
<div class="no-trains" v-if="computedTrains.length == 0">Ups! Brak pociągów do wyświetlenia :/</div>
|
||||
|
||||
<ul class="list">
|
||||
<li class="item" v-for="train in computedTrains" :key="train.timetableId">
|
||||
<a :href="'https://rj.td2.info.pl/train#' + train.trainNo + ';eu'" target="_blank">
|
||||
@@ -85,6 +88,7 @@
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@@ -111,6 +115,20 @@ export default class TrainTable extends Vue {
|
||||
<style lang="scss" scoped>
|
||||
@import "../../styles/responsive.scss";
|
||||
|
||||
.train-table {
|
||||
font-size: calc(0.4rem + 0.5vw);
|
||||
}
|
||||
|
||||
.no-trains {
|
||||
text-align: center;
|
||||
font-size: 1.5em;
|
||||
|
||||
padding: 1rem;
|
||||
margin: 1rem 0;
|
||||
|
||||
background: #333;
|
||||
}
|
||||
|
||||
.list {
|
||||
overflow: auto;
|
||||
|
||||
@@ -123,8 +141,6 @@ export default class TrainTable extends Vue {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
|
||||
|
||||
font-size: calc(0.4rem + 0.5vw);
|
||||
|
||||
background-color: #444;
|
||||
padding: 1rem;
|
||||
|
||||
|
||||
@@ -180,17 +180,6 @@ export default class TrainsView extends Vue {
|
||||
}
|
||||
|
||||
get computedTrains() {
|
||||
// const trainDetected = this.onlineTrainsList.filter(
|
||||
// (train) =>
|
||||
// train.trainNo.toString().includes(this.searched) && this.searched != ""
|
||||
// );
|
||||
// const playerDetected = this.onlineTrainsList.filter(
|
||||
// (train) =>
|
||||
// // this.searched.toLowerCase().includes(train.driverName.toLowerCase())
|
||||
// train.driverName.toLowerCase().includes(this.searched.toLowerCase()) &&
|
||||
// this.searched != ""
|
||||
// );
|
||||
|
||||
const computed = this.onlineTrainsList.filter(
|
||||
(train) =>
|
||||
!train.noTimetable &&
|
||||
|
||||
Reference in New Issue
Block a user