design: badge poziomów

This commit is contained in:
2023-02-12 12:58:23 +01:00
parent e14d328ed9
commit 59bd3fa2ef
7 changed files with 145 additions and 96 deletions
@@ -17,10 +17,10 @@
@keydown.enter="navigateToScenery(item.stationName, item.isOnline)"
tabindex="0"
>
<span>
<span class="item-general">
<b
v-if="item.dispatcherLevel !== null"
class="dispatcher-level"
class="level-badge dispatcher"
:style="calculateExpStyle(item.dispatcherLevel, item.dispatcherIsSupporter)"
>
{{ item.dispatcherLevel >= 2 ? item.dispatcherLevel : 'L' }}
@@ -31,7 +31,7 @@
<span class="region-badge" :class="item.region">PL1</span>
</span>
<span>
<span class="item-time">
<span :data-status="item.isOnline"> {{ item.isOnline ? $t('journal.online-since') : 'OFFLINE' }}&nbsp; </span>
<span>
{{ new Date(item.timestampFrom).toLocaleTimeString('pl-PL', { timeStyle: 'short' }) }}
@@ -99,18 +99,9 @@ export default defineComponent({
<style lang="scss" scoped>
@import '../../styles/animations.scss';
@import '../../styles/responsive.scss';
@import '../../styles/badge.scss';
@import '../../styles/JournalSection.scss';
.region-badge {
padding: 0.1em 0.5em;
border-radius: 0.5em;
font-weight: bold;
&.eu {
background-color: forestgreen;
}
}
li.sticky {
position: sticky;
top: 0;
@@ -141,6 +132,16 @@ li.sticky {
}
}
.item-general {
display: flex;
align-items: center;
gap: 0.25em;
.level-badge {
margin-right: 0.25em;
}
}
.journal_day {
margin-bottom: 1em;
padding: 0.5em;
@@ -157,16 +158,4 @@ li.sticky {
font-weight: bold;
}
}
.dispatcher-level {
display: inline-block;
text-align: center;
line-height: 1.45em;
width: 1.45em;
height: 1.45em;
margin-right: 0.45em;
border-radius: 0.25em;
}
</style>