mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
chore(profile): added links to player journals; merged player activity into main info
This commit is contained in:
@@ -45,39 +45,61 @@
|
||||
{{ t('profile.stats.dispatcher') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="player-journal-links">
|
||||
<router-link
|
||||
class="a-button btn--action"
|
||||
:to="`/journal/timetables?search-driver=${playerInfo.driverStats.driverName}`"
|
||||
>
|
||||
DZIENNIK RJ
|
||||
</router-link>
|
||||
|
||||
<router-link
|
||||
class="a-button btn--action"
|
||||
:to="`/journal/dispatchers?search-dispatcher=${playerInfo.dispatcherStats.dispatcherName}`"
|
||||
>
|
||||
DZIENNIK DR
|
||||
</router-link>
|
||||
</div>
|
||||
|
||||
<!-- Current activity -->
|
||||
<div
|
||||
class="player-activity"
|
||||
v-if="activeDispatches.length > 0 || activeTrains.length > 0"
|
||||
>
|
||||
|
||||
<div class="info-activity" v-if="activeDispatches.length > 0">
|
||||
<router-link
|
||||
v-for="d in activeDispatches"
|
||||
class="dispatcher-badge"
|
||||
:to="`/scenery?station=${d.stationName}`"
|
||||
>
|
||||
<img src="/images/icon-user.svg" width="25" alt="user icon" />
|
||||
<b>{{ d.stationName }}</b>
|
||||
<StationStatusBadge :isOnline="true" :dispatcherStatus="d.dispatcherStatus" />
|
||||
</router-link>
|
||||
</div>
|
||||
|
||||
<div class="info-activity" v-if="activeTrains.length > 0">
|
||||
<router-link
|
||||
v-for="d in activeTrains"
|
||||
:to="`/driver?trainId=${d.id}`"
|
||||
class="driver-badge"
|
||||
>
|
||||
<img src="/images/icon-train.svg" width="25" alt="train icon" />
|
||||
<span v-if="d.timetable" class="text--primary">{{ d.timetable.category }}</span>
|
||||
<span>{{ d.trainNo }}</span>
|
||||
•
|
||||
<span>{{ d.currentStationName }}</span>
|
||||
•
|
||||
<span class="text--grayed">{{ d.stockString.split(';')[0] }}</span>
|
||||
</router-link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Current activity -->
|
||||
<div class="player-activity" v-if="activeDispatches.length > 0 || activeTrains.length > 0">
|
||||
<h3>{{ t('profile.stats.currently-online') }}</h3>
|
||||
|
||||
<div class="info-activity" v-if="activeDispatches.length > 0">
|
||||
<router-link
|
||||
v-for="d in activeDispatches"
|
||||
class="dispatcher-badge"
|
||||
:to="`/scenery?station=${d.stationName}`"
|
||||
>
|
||||
<img src="/images/icon-user.svg" width="25" alt="user icon" />
|
||||
<b>{{ d.stationName }}</b>
|
||||
<StationStatusBadge :isOnline="true" :dispatcherStatus="d.dispatcherStatus" />
|
||||
</router-link>
|
||||
</div>
|
||||
|
||||
<div class="info-activity" v-if="activeTrains.length > 0">
|
||||
<router-link v-for="d in activeTrains" :to="`/driver?trainId=${d.id}`" class="driver-badge">
|
||||
<img src="/images/icon-train.svg" width="25" alt="train icon" />
|
||||
<span v-if="d.timetable" class="text--primary">{{ d.timetable.category }}</span>
|
||||
<span>{{ d.trainNo }}</span>
|
||||
•
|
||||
<span>{{ d.currentStationName }}</span>
|
||||
•
|
||||
<span class="text--grayed">{{ d.stockString.split(';')[0] }}</span>
|
||||
</router-link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="player-stats">
|
||||
<div class="stats-driver">
|
||||
<h3 class="stats-header">
|
||||
@@ -265,7 +287,6 @@ const activeTrains = computed(() => {
|
||||
}
|
||||
|
||||
.player-info,
|
||||
.player-activity,
|
||||
.player-stats > div {
|
||||
background-color: var(--clr-tile);
|
||||
border-radius: 0.5em;
|
||||
@@ -282,6 +303,13 @@ const activeTrains = computed(() => {
|
||||
gap: 1em;
|
||||
}
|
||||
|
||||
.player-journal-links {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 0.5em;
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.badge-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
Reference in New Issue
Block a user