refs #165 Add basic search content

This commit is contained in:
AkiraFukushima 2018-04-15 20:22:27 +09:00
parent 41dbd3dc50
commit 880484adc6
6 changed files with 38 additions and 2 deletions

View File

@ -0,0 +1,14 @@
<template>
<div id="search">
search
</div>
</template>
<script>
export default {
name: 'search'
}
</script>
<style lnag="scss" scoped>
</style>

View File

@ -40,10 +40,13 @@ export default {
this.$store.commit('TimelineSpace/HeaderMenu/updateTitle', 'Favourite') this.$store.commit('TimelineSpace/HeaderMenu/updateTitle', 'Favourite')
break break
case 'local': case 'local':
this.$store.commit('TimelineSpace/HeaderMenu/updateTitle', 'LocalTimeline') this.$store.commit('TimelineSpace/HeaderMenu/updateTitle', 'Local timeline')
break break
case 'public': case 'public':
this.$store.commit('TimelineSpace/HeaderMenu/updateTitle', 'PublicTimeline') this.$store.commit('TimelineSpace/HeaderMenu/updateTitle', 'Public timeline')
break
case 'search':
this.$store.commit('TimelineSpace/HeaderMenu/updateTitle', 'Search')
break break
case 'lists': case 'lists':
this.$store.dispatch('TimelineSpace/HeaderMenu/fetchList', this.$route.params.list_id) this.$store.dispatch('TimelineSpace/HeaderMenu/fetchList', this.$route.params.list_id)

View File

@ -37,6 +37,10 @@
<icon name="globe"></icon> <icon name="globe"></icon>
<span>Public timeline</span> <span>Public timeline</span>
</el-menu-item> </el-menu-item>
<el-menu-item :index="`/${id()}/search`">
<icon name="search"></icon>
<span>Search</span>
</el-menu-item>
<li class="el-menu-item menu-item-title"> <li class="el-menu-item menu-item-title">
<icon name="list-ul"></icon> <icon name="list-ul"></icon>
<span>Lists</span> <span>Lists</span>

View File

@ -67,6 +67,11 @@ export default new Router({
name: 'public', name: 'public',
component: require('@/components/TimelineSpace/Contents/Public').default component: require('@/components/TimelineSpace/Contents/Public').default
}, },
{
path: 'search',
name: 'search',
component: require('@/components/TimelineSpace/Contents/Search').default
},
{ {
path: 'lists/:list_id', path: 'lists/:list_id',
name: 'lists', name: 'lists',

View File

@ -4,6 +4,7 @@ import Notifications from './Contents/Notifications'
import Favourites from './Contents/Favourites' import Favourites from './Contents/Favourites'
import Local from './Contents/Local' import Local from './Contents/Local'
import Public from './Contents/Public' import Public from './Contents/Public'
import Search from './Contents/Search'
import Lists from './Contents/Lists' import Lists from './Contents/Lists'
import Cards from './Contents/Cards' import Cards from './Contents/Cards'
@ -16,6 +17,7 @@ const Contents = {
Favourites, Favourites,
Local, Local,
Public, Public,
Search,
Lists, Lists,
Cards Cards
} }

View File

@ -0,0 +1,8 @@
const Search = {
namespaced: true,
state: {},
mutations: {},
actions: {}
}
export default Search