KawAnime/components/logs.vue

100 lines
1.9 KiB
Vue
Raw Normal View History

<template lang="pug">
2017-11-13 14:05:42 +00:00
v-dialog(lazy, absolute, max-width='70%', v-model='show', @keydown.esc='close()')
v-btn(icon, flat, slot='activator')
v-icon fiber_new
v-card#logs
v-card-title
span.headline What's new in this version?
v-spacer
v-btn.blue--text.darken-1(flat, @click="close()") Close
v-divider
v-card-text
vue-markdown(:anchorAttributes="{target: '_blank'}") {{ logs }}
v-card-actions
v-spacer
v-btn.blue--text.darken-1(flat, @click="close()") Close
</template>
<script>
export default {
computed: {
show: {
get () {
return this.$store.state.logs.show
},
set (val) {
this.$store.commit('logs/show', val)
}
},
logs () {
return this.$store.state.logs.logs
}
},
methods: {
close () {
this.$store.commit('logs/show', false)
}
2017-11-17 18:17:34 +00:00
},
watch: {
logs () {
this.$nextTick(() => {
const aTags = document.querySelectorAll('#logs a')
this.$_.each(aTags, (a) => {
a.onclick = (e) => {
e.preventDefault()
this.$axios.get('openThis', {
params: {
type: 'link',
link: a.href
}
})
}
})
})
}
}
}
</script>
2017-10-14 13:43:43 +00:00
<style lang="stylus">
#logs h2
2017-10-14 13:43:43 +00:00
font-size 32px
font-weight 300
letter-spacing 1px
padding-left 10px
#logs h3
2017-10-14 13:43:43 +00:00
font-size 24px
font-weight 300
letter-spacing 1px
padding-left 10px
margin-top 15px
margin-bottom 5px
2017-09-27 12:21:28 +00:00
#logs blockquote
2017-10-14 13:43:43 +00:00
padding-bottom 5px
padding-top 5px
2017-09-27 12:21:28 +00:00
2017-09-28 16:54:53 +00:00
#logs code
2017-10-14 13:43:43 +00:00
background-color rgba(0, 0, 0, 0)
color white
display inline
font-size 14px
font-weight 400 !important
2017-09-28 16:54:53 +00:00
#logs p
2017-10-14 13:43:43 +00:00
text-indent 20px
letter-spacing 0.05em
font-weight 400
#logs ul
2017-10-14 13:43:43 +00:00
padding-left 10%
#logs li
2017-10-14 13:43:43 +00:00
margin-bottom 4px
letter-spacing 0.05em
font-weight 400
</style>