refs #90 Update channel header when url is changed

This commit is contained in:
AkiraFukushima 2018-03-22 18:16:45 +09:00
parent 708b8aec65
commit f59e39efaa
1 changed files with 20 additions and 2 deletions

View File

@ -1,12 +1,30 @@
<template>
<div id="header_menu">
<div class="channel">#Home</div>
<div class="channel">#{{ channelName() }}</div>
</div>
</template>
<script>
export default {
name: 'header-menu'
name: 'header-menu',
methods: {
channelName () {
switch (this.$route.name) {
case 'home':
return 'Home'
case 'notifications':
return 'Notification'
case 'favourites':
return 'Favourite'
case 'local':
return 'LocalTimeline'
case 'public':
return 'PublicTimeline'
default:
return 'Home'
}
}
}
}
</script>