2018-03-09 07:21:25 +01:00
|
|
|
<template>
|
|
|
|
<div id="side_menu">
|
2018-03-09 07:48:20 +01:00
|
|
|
<div class="profile-wrapper">
|
|
|
|
<div class="profile">
|
|
|
|
{{ instance.baseURL }}
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-03-09 07:21:25 +01:00
|
|
|
<el-menu
|
|
|
|
default-active="1"
|
|
|
|
background-color="#373d48"
|
|
|
|
text-color="#909399"
|
|
|
|
active-text-color="#ffffff"
|
|
|
|
:router="true"
|
|
|
|
class="el-menu-vertical timeline-menu">
|
|
|
|
<el-menu-item index="1" :route="{path: `/${id()}/home`}">
|
|
|
|
<icon name="home"></icon>
|
|
|
|
<span>Home</span>
|
|
|
|
</el-menu-item>
|
|
|
|
<el-menu-item index="2" :route="{path: `/${id()}/notification`}">
|
|
|
|
<icon name="bell"></icon>
|
|
|
|
<span>Notification</span>
|
|
|
|
</el-menu-item>
|
|
|
|
<el-menu-item index="3" :route="{path: `/${id()}/fav`}">
|
|
|
|
<icon name="star"></icon>
|
|
|
|
<span>Fav</span>
|
|
|
|
</el-menu-item>
|
|
|
|
<el-menu-item index="4" :route="{path: `/${id()}/local`}">
|
|
|
|
<icon name="users"></icon>
|
|
|
|
<span>LocalTimeline</span>
|
|
|
|
</el-menu-item>
|
|
|
|
<el-menu-item index="5" :route="{path: `/${id()}/global`}">
|
|
|
|
<icon name="globe"></icon>
|
|
|
|
<span>PublicTimeline</span>
|
|
|
|
</el-menu-item>
|
|
|
|
</el-menu>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2018-03-09 07:48:20 +01:00
|
|
|
import { mapState } from 'vuex'
|
|
|
|
|
2018-03-09 07:21:25 +01:00
|
|
|
export default {
|
|
|
|
name: 'side-menu',
|
2018-03-09 07:48:20 +01:00
|
|
|
computed: {
|
|
|
|
...mapState({
|
|
|
|
instance: state => state.TimelineSpace.SideMenu.instance
|
|
|
|
})
|
|
|
|
},
|
|
|
|
created () {
|
|
|
|
this.$store.dispatch('TimelineSpace/SideMenu/fetchInstance', this.$route.params.id)
|
|
|
|
},
|
2018-03-09 07:21:25 +01:00
|
|
|
methods: {
|
|
|
|
id () {
|
|
|
|
return this.$route.params.id
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
#side_menu {
|
2018-03-09 07:48:20 +01:00
|
|
|
.profile-wrapper {
|
|
|
|
background-color: #373d48;
|
2018-03-09 07:21:25 +01:00
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
left: 65px;
|
2018-03-09 07:48:20 +01:00
|
|
|
width: 144px;
|
|
|
|
height: 40px;
|
|
|
|
|
|
|
|
.profile {
|
|
|
|
color: #ffffff;
|
|
|
|
font-weight: bold;
|
|
|
|
padding: 10px 20px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.timeline-menu {
|
|
|
|
position: fixed;
|
|
|
|
top: 40px;
|
|
|
|
left: 65px;
|
2018-03-09 07:21:25 +01:00
|
|
|
height: 100%;
|
2018-03-09 07:48:20 +01:00
|
|
|
width: 144px;
|
2018-03-09 07:21:25 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|