Cleanup i restrukturyzacja widoku scenerii

This commit is contained in:
2022-01-05 13:23:57 +01:00
parent 054f8434e6
commit 526f2bef37
11 changed files with 571 additions and 465 deletions
@@ -0,0 +1,54 @@
<template>
<section class="info-spawn-list">
<h3 class="spawn-header section-header">
{{ $t('scenery.spawns') }}
<img :src="icons.spawn" alt="icon-spawn" />
</h3>
<span v-if="station.onlineInfo">
<span
class="badge spawn"
v-for="(spawn, i) in station.onlineInfo.spawns"
:key="spawn.spawnName + station.onlineInfo?.dispatcherName + i"
>
<span class="spawn_name">{{ spawn.spawnName }}</span>
<span class="spawn_length">{{ spawn.spawnLength }}m</span>
</span>
</span>
<span class="badge spawn badge-none" v-if="!station.onlineInfo || station.onlineInfo.spawns.length == 0"
>{{ $t('scenery.no-spawns') }}
</span>
</section>
</template>
<script lang="ts">
import Station from '@/scripts/interfaces/Station';
import { defineComponent } from 'vue';
export default defineComponent({
props: {
station: {
type: Object as () => Station,
default: {},
},
},
data: () => ({
icons: {
spawn: require('@/assets/icon-spawn.svg'),
},
}),
});
</script>
<style lang="scss" scoped>
@import '../../../styles/variables.scss';
.spawn {
&_length {
background: $accentCol;
color: black;
}
}
</style>