mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 73828867da | |||
| 75685c1e0e | |||
| 496ff95236 | |||
| 7e25327832 | |||
| 272c9f50f8 |
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "stacjownik",
|
||||
"version": "1.11.0",
|
||||
"version": "1.11.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -15,6 +15,14 @@
|
||||
tabindex="0"
|
||||
>
|
||||
<span>
|
||||
<b
|
||||
v-if="item.dispatcherLevel !== null"
|
||||
class="dispatcher-level"
|
||||
:style="calculateExpStyle(item.dispatcherLevel, item.dispatcherIsSupporter)"
|
||||
>
|
||||
{{ item.dispatcherLevel >= 2 ? item.dispatcherLevel : 'L' }}
|
||||
</b>
|
||||
|
||||
<b class="text--primary">{{ item.dispatcherName }}</b> • <b>{{ item.stationName }}</b>
|
||||
<span class="text--grayed"> #{{ item.stationHash }} </span>
|
||||
<span class="region-badge" :class="item.region">PL1</span>
|
||||
@@ -44,6 +52,7 @@
|
||||
import { defineComponent, PropType } from 'vue';
|
||||
import dateMixin from '../../mixins/dateMixin';
|
||||
import { DispatcherHistory } from '../../scripts/interfaces/api/DispatchersAPIData';
|
||||
import styleMixin from '../../mixins/styleMixin';
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
@@ -53,7 +62,7 @@ export default defineComponent({
|
||||
},
|
||||
},
|
||||
|
||||
mixins: [dateMixin],
|
||||
mixins: [dateMixin, styleMixin],
|
||||
|
||||
computed: {
|
||||
computedDispatcherHistory() {
|
||||
@@ -143,6 +152,18 @@ li.sticky {
|
||||
}
|
||||
}
|
||||
|
||||
.dispatcher-level {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
line-height: 150%;
|
||||
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
|
||||
margin-right: 0.5em;
|
||||
border-radius: 0.25em;
|
||||
}
|
||||
|
||||
@include smallScreen() {
|
||||
.journal_item {
|
||||
flex-direction: column;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<b class="text--primary">{{ timetable.trainCategoryCode }} </b>
|
||||
<b>{{ timetable.trainNo }}</b>
|
||||
| <span>{{ timetable.driverName }}</span> |
|
||||
<span class="text--grayed">#{{ timetable.timetableId }}</span>
|
||||
<span class="text--grayed">#{{ timetable.id }}</span>
|
||||
</span>
|
||||
|
||||
<span>
|
||||
|
||||
@@ -4,6 +4,8 @@ export interface DispatcherHistory {
|
||||
currentDuration: number;
|
||||
dispatcherId: number;
|
||||
dispatcherName: string;
|
||||
dispatcherLevel: number | null;
|
||||
dispatcherIsSupporter: boolean;
|
||||
isOnline: boolean;
|
||||
lastOnlineTimestamp: number;
|
||||
region: string;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
export interface TimetableHistory {
|
||||
id: number;
|
||||
|
||||
timetableId: number;
|
||||
trainNo: number;
|
||||
trainCategoryCode: string;
|
||||
|
||||
@@ -234,7 +234,7 @@ export default defineComponent({
|
||||
if (this.sorterActive.id == 'distance') queries.push('sortBy=routeDistance');
|
||||
else if (this.sorterActive.id == 'total-stops') queries.push('sortBy=allStopsCount');
|
||||
else if (this.sorterActive.id == 'beginDate') queries.push('sortBy=beginDate');
|
||||
else queries.push('sortBy=timetableId');
|
||||
// else queries.push('sortBy=timetableId');
|
||||
|
||||
queries.push('countLimit=15');
|
||||
|
||||
|
||||
+2
-1
@@ -12,7 +12,7 @@ export default defineConfig({
|
||||
registerType: 'prompt',
|
||||
|
||||
workbox: {
|
||||
globPatterns: ['**/*.{js,css,html,png,svg,img}'],
|
||||
globPatterns: ['**/*.{js,css,html,png,svg,jpg}'],
|
||||
runtimeCaching: [
|
||||
{
|
||||
urlPattern: new RegExp('^https://spythere.pl/api/getSceneries', 'i'),
|
||||
@@ -20,6 +20,7 @@ export default defineConfig({
|
||||
options: {
|
||||
cacheName: 'sceneries-cache',
|
||||
expiration: {
|
||||
maxEntries: 1,
|
||||
maxAgeSeconds: 60 * 60 * 24 * 7, // <== 7 days
|
||||
},
|
||||
cacheableResponse: {
|
||||
|
||||
Reference in New Issue
Block a user