mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
1.4.5: Poprawki odświeżonego wyglądu
This commit is contained in:
+2
-5
@@ -98,7 +98,7 @@ export default class App extends Vue {
|
|||||||
@Action("synchronizeData") synchronizeData;
|
@Action("synchronizeData") synchronizeData;
|
||||||
@Getter("getAllData") data;
|
@Getter("getAllData") data;
|
||||||
|
|
||||||
private VERSION = "1.4.4";
|
private VERSION = "1.4.5";
|
||||||
|
|
||||||
hasReleaseNotes = false;
|
hasReleaseNotes = false;
|
||||||
updateModalVisible = false;
|
updateModalVisible = false;
|
||||||
@@ -187,10 +187,7 @@ export default class App extends Vue {
|
|||||||
|
|
||||||
// VUE ROUTE CHANGE ANIMATION
|
// VUE ROUTE CHANGE ANIMATION
|
||||||
.view-anim {
|
.view-anim {
|
||||||
&-enter {
|
&-enter,
|
||||||
opacity: 0.02;
|
|
||||||
}
|
|
||||||
|
|
||||||
&-leave-to {
|
&-leave-to {
|
||||||
opacity: 0.02;
|
opacity: 0.02;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#FFFFFF"><rect fill="none" height="24" width="24"/><g><path d="M7.5,21H2V9h5.5V21z M14.75,3h-5.5v18h5.5V3z M22,11h-5.5v10H22V11z"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 268 B |
@@ -37,11 +37,11 @@ export default class ActionButton extends Vue {}
|
|||||||
border: 1px solid white;
|
border: 1px solid white;
|
||||||
}
|
}
|
||||||
|
|
||||||
img.button_icon {
|
img {
|
||||||
width: 1.25em;
|
width: 1.25em;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
|
||||||
margin-right: 0.2em;
|
margin-right: 0.35em;
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ $saveCol: #28a826;
|
|||||||
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
padding: 0.45em 0.4em;
|
padding: 0.3em 0.4em;
|
||||||
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
@@ -2,7 +2,10 @@
|
|||||||
<div class="train-stats">
|
<div class="train-stats">
|
||||||
<transition name="stats-anim">
|
<transition name="stats-anim">
|
||||||
<div class="stats-body" v-if="trainStatsOpen">
|
<div class="stats-body" v-if="trainStatsOpen">
|
||||||
<h2 class="stats-header">{{ $t("trains.stats") }}</h2>
|
<h2 class="stats-header">
|
||||||
|
<img :src="statsIcon" :alt="$t('trains.stats')" />
|
||||||
|
{{ $t("trains.stats") }}
|
||||||
|
</h2>
|
||||||
|
|
||||||
<div class="stats-speed">
|
<div class="stats-speed">
|
||||||
<div class="title stats-title">
|
<div class="title stats-title">
|
||||||
@@ -80,6 +83,8 @@ export default class TrainStats extends Vue {
|
|||||||
@Prop() readonly trains!: Train[];
|
@Prop() readonly trains!: Train[];
|
||||||
@Prop() readonly trainStatsOpen!: boolean;
|
@Prop() readonly trainStatsOpen!: boolean;
|
||||||
|
|
||||||
|
statsIcon = require("@/assets/icon-stats.svg");
|
||||||
|
|
||||||
get speedStats(): { avg: string; min: string; max: string } {
|
get speedStats(): { avg: string; min: string; max: string } {
|
||||||
if (this.trains.length == 0) return { avg: "0", min: "0", max: "0" };
|
if (this.trains.length == 0) return { avg: "0", min: "0", max: "0" };
|
||||||
|
|
||||||
@@ -213,7 +218,13 @@ export default class TrainStats extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&-header {
|
&-header {
|
||||||
|
display: flex;
|
||||||
margin-bottom: 0.85em;
|
margin-bottom: 0.85em;
|
||||||
|
|
||||||
|
img {
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-right: 0.35em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&-body {
|
&-body {
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
v-for="(train, i) in computedTrains"
|
v-for="(train, i) in computedTrains"
|
||||||
:key="i"
|
:key="i"
|
||||||
:id="train.timetableData.timetableId"
|
:id="train.timetableData.timetableId"
|
||||||
|
:ref="train.timetableData.timetableId"
|
||||||
>
|
>
|
||||||
<span class="wrapper">
|
<span class="wrapper">
|
||||||
<span
|
<span
|
||||||
@@ -154,7 +155,7 @@
|
|||||||
:followingStops="train.timetableData.followingStops"
|
:followingStops="train.timetableData.followingStops"
|
||||||
:currentStationName="train.currentStationName"
|
:currentStationName="train.currentStationName"
|
||||||
@click="changeScheduleShowState(train.timetableData.timetableId)"
|
@click="changeScheduleShowState(train.timetableData.timetableId)"
|
||||||
v-if="showedSchedule == train.timetableData.timetableId"
|
v-show="showedSchedule == train.timetableData.timetableId"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -193,8 +194,18 @@ export default class TrainTable extends Vue {
|
|||||||
signalIcon: string = require("@/assets/icon-signal.svg");
|
signalIcon: string = require("@/assets/icon-signal.svg");
|
||||||
routeIcon: string = require("@/assets/icon-route.svg");
|
routeIcon: string = require("@/assets/icon-route.svg");
|
||||||
|
|
||||||
|
focusOnTrain(timetableId: number) {
|
||||||
|
const currentEl: HTMLElement = this.$refs[timetableId][0];
|
||||||
|
|
||||||
|
currentEl.scrollIntoView({
|
||||||
|
behavior: "smooth",
|
||||||
|
block: "nearest",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
changeScheduleShowState(timetableId: number) {
|
changeScheduleShowState(timetableId: number) {
|
||||||
this.showedSchedule = this.showedSchedule === timetableId ? 0 : timetableId;
|
this.showedSchedule = this.showedSchedule === timetableId ? 0 : timetableId;
|
||||||
|
this.$nextTick(() => this.focusOnTrain(timetableId));
|
||||||
}
|
}
|
||||||
|
|
||||||
onImageError(e: Event) {
|
onImageError(e: Event) {
|
||||||
@@ -365,7 +376,7 @@ export default class TrainTable extends Vue {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
|
|
||||||
font-size: 0.85em;
|
font-size: 0.9em;
|
||||||
|
|
||||||
// grid-column: 1 / 3;
|
// grid-column: 1 / 3;
|
||||||
// grid-column: span 2;
|
// grid-column: span 2;
|
||||||
|
|||||||
@@ -13,5 +13,5 @@ $accent2Col: #ff3d5d;
|
|||||||
$skr: #ff5100;
|
$skr: #ff5100;
|
||||||
$twr: #ffbb00;
|
$twr: #ffbb00;
|
||||||
|
|
||||||
$animDuration: 100ms;
|
$animDuration: 150ms;
|
||||||
$animType: ease-out;
|
$animType: ease-in-out;
|
||||||
@@ -205,12 +205,12 @@ export default class StationsView extends Vue {
|
|||||||
.card-anim {
|
.card-anim {
|
||||||
&-enter-active,
|
&-enter-active,
|
||||||
&-leave-active {
|
&-leave-active {
|
||||||
transition: all 0.25s ease-in-out;
|
transition: all $animDuration $animType;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-enter,
|
&-enter,
|
||||||
&-leave-to {
|
&-leave-to {
|
||||||
transform: translate(-45%, -50%);
|
transform: translate(-50%, -50%) scale(0.85);
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
<div class="options-bar">
|
<div class="options-bar">
|
||||||
<div class="stats">
|
<div class="stats">
|
||||||
<action-button @click.native="toggleStats">
|
<action-button @click.native="toggleStats">
|
||||||
|
<img :src="statsIcon" :alt="$t('trains.stats')" />
|
||||||
{{ $t("trains.stats") }}
|
{{ $t("trains.stats") }}
|
||||||
</action-button>
|
</action-button>
|
||||||
<TrainStats :trains="trains" :trainStatsOpen="trainStatsOpen" />
|
<TrainStats :trains="trains" :trainStatsOpen="trainStatsOpen" />
|
||||||
@@ -60,6 +61,8 @@ export default class TrainsView extends Vue {
|
|||||||
// Passed in route as query parameters
|
// Passed in route as query parameters
|
||||||
@Prop() readonly queryTrain!: string;
|
@Prop() readonly queryTrain!: string;
|
||||||
|
|
||||||
|
statsIcon = require("@/assets/icon-stats.svg");
|
||||||
|
|
||||||
sorterActive: { id: string; dir: number } = { id: "distance", dir: -1 };
|
sorterActive: { id: string; dir: number } = { id: "distance", dir: -1 };
|
||||||
|
|
||||||
trainStatsOpen: boolean = false;
|
trainStatsOpen: boolean = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user