mirror of https://github.com/Kylart/KawAnime.git
Set up basic pages for streaming and torrenting pages
This commit is contained in:
parent
043f25a043
commit
fd3f7beadc
|
@ -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>
|
|
@ -0,0 +1,3 @@
|
|||
<template lang="pug">
|
||||
h1 not yet
|
||||
</template>
|
|
@ -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'),
|
||||
|
|
|
@ -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.',
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,5 +5,9 @@ export default {
|
|||
modal: {
|
||||
show: false,
|
||||
magnets: []
|
||||
},
|
||||
page: {
|
||||
torrents: [],
|
||||
term: ''
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue