mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-04 22:08:12 +00:00
feature: like count historii dyżurnych
This commit is contained in:
@@ -29,6 +29,10 @@
|
|||||||
<b class="text--primary">{{ item.dispatcherName }}</b> • <b>{{ item.stationName }}</b>
|
<b class="text--primary">{{ item.dispatcherName }}</b> • <b>{{ item.stationName }}</b>
|
||||||
<span class="text--grayed"> #{{ item.stationHash }} </span>
|
<span class="text--grayed"> #{{ item.stationHash }} </span>
|
||||||
<span class="region-badge" :class="item.region">PL1</span>
|
<span class="region-badge" :class="item.region">PL1</span>
|
||||||
|
<span class="like-count" v-if="item.dispatcherRate">
|
||||||
|
<img :src="getIcon('like')" alt="like icon" />
|
||||||
|
{{ item.dispatcherRate }}
|
||||||
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="item-time">
|
<span class="item-time">
|
||||||
@@ -55,6 +59,7 @@ import { defineComponent, PropType } from 'vue';
|
|||||||
import dateMixin from '../../mixins/dateMixin';
|
import dateMixin from '../../mixins/dateMixin';
|
||||||
import { DispatcherHistory } from '../../scripts/interfaces/api/DispatchersAPIData';
|
import { DispatcherHistory } from '../../scripts/interfaces/api/DispatchersAPIData';
|
||||||
import styleMixin from '../../mixins/styleMixin';
|
import styleMixin from '../../mixins/styleMixin';
|
||||||
|
import imageMixin from '../../mixins/imageMixin';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
@@ -64,7 +69,7 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
mixins: [dateMixin, styleMixin],
|
mixins: [dateMixin, styleMixin, imageMixin],
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
computedDispatcherHistory() {
|
computedDispatcherHistory() {
|
||||||
@@ -101,6 +106,7 @@ export default defineComponent({
|
|||||||
@import '../../styles/responsive.scss';
|
@import '../../styles/responsive.scss';
|
||||||
@import '../../styles/badge.scss';
|
@import '../../styles/badge.scss';
|
||||||
@import '../../styles/JournalSection.scss';
|
@import '../../styles/JournalSection.scss';
|
||||||
|
@import '../../styles/variables.scss';
|
||||||
|
|
||||||
li.sticky {
|
li.sticky {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
@@ -114,7 +120,7 @@ li.sticky {
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
||||||
gap: 0.25em;
|
gap: 0.5em 1em;
|
||||||
|
|
||||||
line-height: 1.7em;
|
line-height: 1.7em;
|
||||||
padding: 0.75em;
|
padding: 0.75em;
|
||||||
@@ -134,11 +140,11 @@ li.sticky {
|
|||||||
|
|
||||||
.item-general {
|
.item-general {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.25em;
|
gap: 0.25em;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
|
||||||
.level-badge {
|
.level-badge {
|
||||||
margin-right: 0.25em;
|
margin-right: 0.25em;
|
||||||
}
|
}
|
||||||
@@ -160,4 +166,18 @@ li.sticky {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.like-count {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.25em;
|
||||||
|
font-size: 1.2em;
|
||||||
|
color: $accentCol;
|
||||||
|
}
|
||||||
|
|
||||||
|
@include smallScreen {
|
||||||
|
.journal_item {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
export interface DispatcherHistory {
|
export interface DispatcherHistory {
|
||||||
id: string;
|
id: string;
|
||||||
|
|
||||||
currentDuration: number;
|
currentDuration: number;
|
||||||
dispatcherId: number;
|
dispatcherId: number;
|
||||||
dispatcherName: string;
|
dispatcherName: string;
|
||||||
dispatcherLevel: number | null;
|
dispatcherLevel: number | null;
|
||||||
|
dispatcherRate: number;
|
||||||
dispatcherIsSupporter: boolean;
|
dispatcherIsSupporter: boolean;
|
||||||
isOnline: boolean;
|
isOnline: boolean;
|
||||||
lastOnlineTimestamp: number;
|
lastOnlineTimestamp: number;
|
||||||
@@ -13,4 +14,4 @@ export interface DispatcherHistory {
|
|||||||
stationName: string;
|
stationName: string;
|
||||||
timestampFrom: number;
|
timestampFrom: number;
|
||||||
timestampTo?: number;
|
timestampTo?: number;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user