mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-02 21:08:12 +00:00
chore(profile): added router links for history list
This commit is contained in:
@@ -14,9 +14,16 @@
|
||||
</div>
|
||||
|
||||
<div class="history-list-box">
|
||||
<ul>
|
||||
<li v-for="entry in combinedJournal">
|
||||
<div style="display: flex; align-items: center; gap: 0.25em">
|
||||
<router-link
|
||||
v-for="entry in combinedJournal"
|
||||
:to="
|
||||
'trainNo' in entry.value
|
||||
? `/journal/timetables?search-train=%23${entry.value.id}`
|
||||
: `/journal/dispatchers?search-dispatcher=${entry.value.dispatcherName}`
|
||||
"
|
||||
>
|
||||
<!-- Date -->
|
||||
<div class="entry-top-date">
|
||||
<img
|
||||
v-if="entry.type == 'Dispatcher'"
|
||||
src="/images/icon-user.svg"
|
||||
@@ -80,14 +87,11 @@
|
||||
<b class="timestamp-indicator" :data-online="entry.value.isOnline">
|
||||
<span v-if="entry.value.isOnline">{{ t('profile.list.online-since') }}: </span>
|
||||
<span>{{
|
||||
humanizeDuration(
|
||||
(entry.value.timestampTo || Date.now()) - entry.value.timestampFrom
|
||||
)
|
||||
humanizeDuration((entry.value.timestampTo || Date.now()) - entry.value.timestampFrom)
|
||||
}}</span>
|
||||
</b>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</router-link>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
@@ -224,7 +228,10 @@ function toggleFilter(filterType: JournalEntryType) {
|
||||
}
|
||||
|
||||
.history-list-box {
|
||||
& > ul > li {
|
||||
padding: 0.25em;
|
||||
}
|
||||
|
||||
.history-list-box > a {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.25em;
|
||||
@@ -234,7 +241,12 @@ function toggleFilter(filterType: JournalEntryType) {
|
||||
|
||||
margin-bottom: 0.5em;
|
||||
text-align: initial;
|
||||
}
|
||||
}
|
||||
|
||||
.entry-top-date {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.25em;
|
||||
}
|
||||
|
||||
.timestamp-indicator {
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
v-if="playerTD2Info"
|
||||
:src="`https://td2.info.pl/index.php?action=dlattach;attach=${playerTD2Info.avatar};type=avatar`"
|
||||
alt="player image"
|
||||
height="120"
|
||||
@error="(e) => ((e.target as any).src = '/images/default-avatar.jpg')"
|
||||
/>
|
||||
|
||||
@@ -71,6 +70,10 @@
|
||||
<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>
|
||||
@@ -320,7 +323,6 @@ const activeTrains = computed(() => {
|
||||
gap: 0.25em;
|
||||
font-weight: bold;
|
||||
|
||||
background-color: #3b3b3b;
|
||||
padding: 0.25em 0.5em;
|
||||
border-radius: 0.5em;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user