LiveAtlas/src/components/sidebar/WorldList.vue

36 lines
664 B
Vue
Raw Normal View History

2020-11-23 12:13:28 +00:00
<template>
2020-12-01 23:20:38 +00:00
<section class="sidebar__section">
2020-12-15 22:11:29 +00:00
<span class="section__heading">{{ heading }}</span>
2020-12-01 23:20:38 +00:00
<ul class="section__content">
2020-11-23 12:13:28 +00:00
<WorldListItem :world="world" v-for="[name, world] in worlds" :key="name"></WorldListItem>
</ul>
2020-12-01 23:20:38 +00:00
</section>
2020-11-23 12:13:28 +00:00
</template>
<script lang="ts">
import WorldListItem from './WorldListItem.vue';
import {defineComponent} from 'vue';
import {useStore} from "@/store";
export default defineComponent({
name: 'WorldList',
components: {
WorldListItem
},
computed: {
2020-12-15 22:11:29 +00:00
heading() {
return useStore().state.messages.mapTypes;
},
2020-11-23 12:13:28 +00:00
worlds() {
return useStore().state.worlds;
}
},
});
</script>
<style scoped>
</style>