mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 21:38:13 +00:00
Poprawiono wygląd modalu RJ
This commit is contained in:
+3
-4
@@ -27,7 +27,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// APP
|
// APP
|
||||||
.app {
|
#app {
|
||||||
color: white;
|
color: white;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
|
|
||||||
@@ -40,8 +40,8 @@
|
|||||||
.app_container {
|
.app_container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: column;
|
flex-flow: column;
|
||||||
height: 100vh;
|
|
||||||
min-height: 800px;
|
min-height: 100vh;
|
||||||
|
|
||||||
header {
|
header {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
@@ -213,7 +213,6 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
padding: 0.1em 0.5em;
|
padding: 0.1em 0.5em;
|
||||||
color: paleturquoise;
|
color: paleturquoise;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.options {
|
.options {
|
||||||
|
|||||||
+70
-71
@@ -1,83 +1,81 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app">
|
<div class="app_container">
|
||||||
<div class="app_container">
|
<!-- <div class="wip-alert">
|
||||||
<!-- <div class="wip-alert">
|
|
||||||
<img class="icon-error" :src="iconError" alt="error" />
|
<img class="icon-error" :src="iconError" alt="error" />
|
||||||
<h2>Stacjownik tymczasowo nieaktywny!</h2>
|
<h2>Stacjownik tymczasowo nieaktywny!</h2>
|
||||||
<p>Absolutny zakaz wjazdu!</p>
|
<p>Absolutny zakaz wjazdu!</p>
|
||||||
</div> -->
|
</div> -->
|
||||||
<header class="app_header">
|
<header class="app_header">
|
||||||
<div class="header_container">
|
<div class="header_container">
|
||||||
<div class="header_icons">
|
<div class="header_icons">
|
||||||
<span class="icons-top">
|
<span class="icons-top">
|
||||||
<img :src="icons.pl" alt="icon-pl" @click="changeLang('en')" v-if="currentLang == 'pl'" />
|
<img :src="icons.pl" alt="icon-pl" @click="changeLang('en')" v-if="currentLang == 'pl'" />
|
||||||
<img :src="icons.en" alt="icon-en" @click="changeLang('pl')" v-else />
|
<img :src="icons.en" alt="icon-en" @click="changeLang('pl')" v-else />
|
||||||
</span>
|
</span>
|
||||||
<span class="icons-bottom">
|
<span class="icons-bottom">
|
||||||
<a href="https://www.paypal.com/paypalme/spythere" target="_blank">
|
<a href="https://www.paypal.com/paypalme/spythere" target="_blank">
|
||||||
<img :src="icons.dollar" alt="icon paypal" />
|
<img :src="icons.dollar" alt="icon paypal" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="https://discord.gg/x2mpNN3svk" target="_blank">
|
<a href="https://discord.gg/x2mpNN3svk" target="_blank">
|
||||||
<img :src="icons.discord" alt="icon discord" />
|
<img :src="icons.discord" alt="icon discord" />
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="header_body">
|
|
||||||
<status-indicator />
|
|
||||||
<span class="header_brand">
|
|
||||||
<img :src="brand_logo" alt="Stacjownik" />
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span class="header_info">
|
|
||||||
<Clock />
|
|
||||||
|
|
||||||
<div class="info_counter">
|
|
||||||
<img src="@/assets/icon-dispatcher.svg" alt="icon dispatcher" />
|
|
||||||
<span class="text--primary">{{ onlineDispatchers.length }}</span>
|
|
||||||
<span class="text--grayed"> / </span>
|
|
||||||
<span class="text--primary">{{ trainList.length }}</span>
|
|
||||||
<img src="@/assets/icon-train.svg" alt="icon train" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<span class="info_region">
|
|
||||||
<SelectBox :itemList="computedRegions" :defaultItemIndex="0" @selected="changeRegion" />
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span class="header_links">
|
|
||||||
<router-link class="route" active-class="route-active" to="/" exact>
|
|
||||||
{{ $t('app.sceneries') }}
|
|
||||||
</router-link>
|
|
||||||
/
|
|
||||||
<router-link class="route" active-class="route-active" to="/trains">{{ $t('app.trains') }}</router-link>
|
|
||||||
/
|
|
||||||
<router-link class="route" active-class="route-active" to="/journal">
|
|
||||||
{{ $t('app.journal') }}
|
|
||||||
</router-link>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
|
||||||
|
|
||||||
<main class="app_main">
|
<div class="header_body">
|
||||||
<router-view v-slot="{ Component }">
|
<status-indicator />
|
||||||
<!-- <transition name="view-anim" mode="out-in"> -->
|
<span class="header_brand">
|
||||||
<keep-alive>
|
<img :src="brand_logo" alt="Stacjownik" />
|
||||||
<component :is="Component" :key="$route.path" />
|
</span>
|
||||||
</keep-alive>
|
|
||||||
</router-view>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<footer class="app_footer">
|
<span class="header_info">
|
||||||
©
|
<Clock />
|
||||||
<a href="https://td2.info.pl/profile/?u=20777" target="_blank">Spythere</a>
|
|
||||||
{{ new Date().getUTCFullYear() }} | v{{ VERSION }}
|
|
||||||
|
|
||||||
<div style="display: none">∫ ukryta taktyczna całka do programowania w HTMLu</div>
|
<div class="info_counter">
|
||||||
</footer>
|
<img src="@/assets/icon-dispatcher.svg" alt="icon dispatcher" />
|
||||||
</div>
|
<span class="text--primary">{{ onlineDispatchers.length }}</span>
|
||||||
|
<span class="text--grayed"> / </span>
|
||||||
|
<span class="text--primary">{{ trainList.length }}</span>
|
||||||
|
<img src="@/assets/icon-train.svg" alt="icon train" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span class="info_region">
|
||||||
|
<SelectBox :itemList="computedRegions" :defaultItemIndex="0" @selected="changeRegion" />
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span class="header_links">
|
||||||
|
<router-link class="route" active-class="route-active" to="/" exact>
|
||||||
|
{{ $t('app.sceneries') }}
|
||||||
|
</router-link>
|
||||||
|
/
|
||||||
|
<router-link class="route" active-class="route-active" to="/trains">{{ $t('app.trains') }}</router-link>
|
||||||
|
/
|
||||||
|
<router-link class="route" active-class="route-active" to="/journal">
|
||||||
|
{{ $t('app.journal') }}
|
||||||
|
</router-link>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main class="app_main">
|
||||||
|
<router-view v-slot="{ Component }">
|
||||||
|
<!-- <transition name="view-anim" mode="out-in"> -->
|
||||||
|
<keep-alive>
|
||||||
|
<component :is="Component" :key="$route.path" />
|
||||||
|
</keep-alive>
|
||||||
|
</router-view>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer class="app_footer">
|
||||||
|
©
|
||||||
|
<a href="https://td2.info.pl/profile/?u=20777" target="_blank">Spythere</a>
|
||||||
|
{{ new Date().getUTCFullYear() }} | v{{ VERSION }}
|
||||||
|
|
||||||
|
<div style="display: none">∫ ukryta taktyczna całka do programowania w HTMLu</div>
|
||||||
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -129,7 +127,8 @@ export default defineComponent({
|
|||||||
return this.options.regions.map((region) => {
|
return this.options.regions.map((region) => {
|
||||||
const regionStationCount =
|
const regionStationCount =
|
||||||
this.store.apiData.stations?.filter((station) => station.region == region.id && station.isOnline).length || 0;
|
this.store.apiData.stations?.filter((station) => station.region == region.id && station.isOnline).length || 0;
|
||||||
const regionTrainCount = this.store.apiData.trains?.filter((train) => train.region == region.id && train.online).length || 0;
|
const regionTrainCount =
|
||||||
|
this.store.apiData.trains?.filter((train) => train.region == region.id && train.online).length || 0;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: region.id,
|
id: region.id,
|
||||||
|
|||||||
@@ -1,28 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="card-dimmer"></div>
|
<div class="train-modal" @keydown.esc="closeModal">
|
||||||
<div class="train-modal" v-click-outside="closeModal" @keydown.esc="closeModal">
|
<div class="modal_background" @click="closeModal"></div>
|
||||||
<transition name="top-info-bar-anim">
|
<div class="modal_content" ref="content" tabindex="0">
|
||||||
<div class="top-info-bar" v-if="isTopBarVisible">
|
<!-- <transition name="top-info-bar-anim">
|
||||||
<span v-if="chosenTrain.timetableData">
|
<div class="top-info-bar" v-if="isTopBarVisible">
|
||||||
<b class="text--primary">{{ chosenTrain.timetableData.category }} {{ chosenTrain.trainNo }}</b>
|
<span v-if="chosenTrain.timetableData">
|
||||||
{{ chosenTrain.driverName }} •
|
<b class="text--primary">{{ chosenTrain.timetableData.category }} {{ chosenTrain.trainNo }}</b>
|
||||||
<b>{{ chosenTrain.timetableData.route.replace('|', ' > ') }}</b>
|
{{ chosenTrain.driverName }} •
|
||||||
•
|
<b>{{ chosenTrain.timetableData.route.replace('|', ' > ') }}</b>
|
||||||
{{ currentDistance(chosenTrain.timetableData.followingStops) }} km /
|
•
|
||||||
<span class="text--primary">{{ chosenTrain.timetableData.routeDistance }} km</span>
|
{{ currentDistance(chosenTrain.timetableData.followingStops) }} km /
|
||||||
•
|
<span class="text--primary">{{ chosenTrain.timetableData.routeDistance }} km</span>
|
||||||
<span class="text--grayed">{{ displayTrainPosition(chosenTrain) }}</span>
|
•
|
||||||
•
|
<span class="text--grayed">{{ displayTrainPosition(chosenTrain) }}</span>
|
||||||
{{ chosenTrain.speed }}km/h
|
•
|
||||||
</span>
|
{{ chosenTrain.speed }}km/h
|
||||||
</div>
|
</span>
|
||||||
</transition>
|
</div>
|
||||||
|
</transition> -->
|
||||||
|
|
||||||
<button class="btn exit" @click="closeModal">
|
<button class="btn exit" @click="closeModal">
|
||||||
<img :src="icons.exit" alt="close card" />
|
<img :src="icons.exit" alt="close card" />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div class="content" tabindex="0" ref="content">
|
|
||||||
<TrainInfo :train="chosenTrain" :extended="false" ref="trainInfo" />
|
<TrainInfo :train="chosenTrain" :extended="false" ref="trainInfo" />
|
||||||
<TrainSchedule :train="chosenTrain" tabindex="0" />
|
<TrainSchedule :train="chosenTrain" tabindex="0" />
|
||||||
</div>
|
</div>
|
||||||
@@ -66,13 +66,17 @@ export default defineComponent({
|
|||||||
contentEl.focus();
|
contentEl.focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
document.body.style.overflowY = 'hidden';
|
||||||
|
// document.body.blur();
|
||||||
|
|
||||||
contentEl.addEventListener('scroll', this.handleContentScroll);
|
// contentEl.addEventListener('scroll', this.handleContentScroll);
|
||||||
},
|
},
|
||||||
|
|
||||||
deactivated() {
|
deactivated() {
|
||||||
(this.$refs['content'] as HTMLElement).removeEventListener('scroll', this.handleContentScroll);
|
document.body.style.overflowY = 'scroll';
|
||||||
this.isTopBarVisible = false;
|
|
||||||
|
// (this.$refs['content'] as HTMLElement).removeEventListener('scroll', this.handleContentScroll);
|
||||||
|
// this.isTopBarVisible = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@@ -112,12 +116,9 @@ export default defineComponent({
|
|||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
||||||
margin: 1em 2em;
|
margin: 0.5em 1em;
|
||||||
|
|
||||||
background-color: #000000;
|
|
||||||
outline: 2px solid white;
|
|
||||||
padding: 0.25em;
|
padding: 0.25em;
|
||||||
border-radius: 50%;
|
|
||||||
|
|
||||||
z-index: 101;
|
z-index: 101;
|
||||||
|
|
||||||
@@ -129,22 +130,44 @@ export default defineComponent({
|
|||||||
|
|
||||||
.train-modal {
|
.train-modal {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 1em;
|
top: 0;
|
||||||
left: 50%;
|
left: 0;
|
||||||
|
|
||||||
text-align: left;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
transform: translateX(-50%);
|
|
||||||
background-color: #202020;
|
|
||||||
|
|
||||||
|
color: white;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
|
|
||||||
width: 95vw;
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
border: 1px solid gray;
|
text-align: left;
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.modal_background {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
background-color: rgba(0, 0, 0, 0.55);
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal_content {
|
||||||
|
position: relative;
|
||||||
|
overflow-y: scroll;
|
||||||
|
|
||||||
|
margin-top: 1em;
|
||||||
|
|
||||||
|
width: 95vw;
|
||||||
|
height: 95vh;
|
||||||
|
|
||||||
|
background-color: #1a1a1a;
|
||||||
|
}
|
||||||
.top-info-bar {
|
.top-info-bar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -163,29 +186,27 @@ export default defineComponent({
|
|||||||
background-color: #000000dd;
|
background-color: #000000dd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
|
||||||
overflow: auto;
|
|
||||||
max-height: 95vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
@include midScreen {
|
@include midScreen {
|
||||||
.exit {
|
.exit {
|
||||||
top: auto;
|
margin: 0.5em;
|
||||||
bottom: 0;
|
|
||||||
|
|
||||||
margin: 1em;
|
|
||||||
|
|
||||||
img {
|
img {
|
||||||
width: 1.75rem;
|
width: 1.75rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
|
||||||
padding-bottom: 3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-info-bar {
|
.top-info-bar {
|
||||||
padding: 0.5em 1em;
|
padding: 0.5em 1em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@include smallScreen {
|
||||||
|
.train-modal {
|
||||||
|
font-size: 1.05em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal_content {
|
||||||
|
max-height: 75vh;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -179,7 +179,6 @@ $stopNameClr: #22a8d1;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.train-schedule {
|
.train-schedule {
|
||||||
background-color: #202020;
|
|
||||||
padding: 0 0.25em;
|
padding: 0 0.25em;
|
||||||
|
|
||||||
@include smallScreen() {
|
@include smallScreen() {
|
||||||
|
|||||||
Reference in New Issue
Block a user