Set up basic pages for streaming and torrenting pages

This commit is contained in:
Kylart 2018-04-29 22:29:32 +02:00
parent 043f25a043
commit fd3f7beadc
6 changed files with 86 additions and 0 deletions

61
pages/streaming.vue Normal file
View File

@ -0,0 +1,61 @@
<template lang="pug">
v-container(fluid, fill-height, grid-list-xs)
v-layout(row, wrap, justify-center)
v-flex.term(xs5)
v-text-field(
@keyup.enter='search',
v-model='term',
label='Looking for something?'
)
v-flex(xs12) Blabla
</template>
<script>
import _ from 'lodash'
export default {
data: () => ({
isSearching: false
}),
computed: {
torrents: {
set () {},
get () {
return this.$store.state.streaming.page.torrents
}
},
term: {
set (val) {
this.$store.commit('streaming/setTerm', val)
},
get () {
return this.$store.state.streaming.page.term
}
}
},
methods: {
async search () {
if (!this.isSearching) {
this.isSearching = true
// async search
this.isSearching = false
}
}
},
watch: {
term: _.debounce(async () => {
await this.search()
}, 300)
}
}
</script>
<style lang="stylus" scoped>
</style>

3
pages/torrenting.vue Normal file
View File

@ -0,0 +1,3 @@
<template lang="pug">
h1 not yet
</template>

View File

@ -24,6 +24,8 @@ export function createRouter () {
routes: [
route('/', 'releases'),
route('/downloader', 'downloader'),
route('/torrenting', 'torrenting'),
route('/streaming', 'streaming'),
route('/seasons', 'seasons'),
route('/news', 'news'),
route('/localPage', 'localPage'),

View File

@ -9,6 +9,16 @@ module.exports = {
'description': 'Download animes!',
'keywords': 'download, animes'
},
'/torrenting': {
'title': 'Torrenting - KawAnime',
'description': 'Manage your anime torrenting life.',
'keywords': 'torrent, download, list, animes'
},
'/streaming': {
'title': 'Streaming - KawAnime',
'description': 'Stream any anime.',
'keywords': 'torrent, streaming, list, animes'
},
'/seasons': {
'title': 'Seasons - KawAnime',
'description': 'Browse the anime seasons.',

View File

@ -10,5 +10,11 @@ export default {
},
closeModal (state) {
state.modal.show = false
},
setTerm (state, val) {
state.page.term = val
},
setTorrents (state, torrents) {
state.page.torrents = torrents
}
}

View File

@ -5,5 +5,9 @@ export default {
modal: {
show: false,
magnets: []
},
page: {
torrents: [],
term: ''
}
}