yumechi-no-kuni/src/client/app/desktop/views/pages/user-list.vue

67 lines
1,005 B
Vue
Raw Normal View History

2018-04-24 22:36:54 -05:00
<template>
<mk-ui>
2018-04-25 06:20:02 -05:00
<div v-if="!fetching" data-id="02010e15-cc48-4245-8636-16078a9b623c">
<div>
<div><h1>{{ list.title }}</h1></div>
</div>
<main>
<mk-user-list-timeline :list="list"/>
</main>
</div>
2018-04-24 22:36:54 -05:00
</mk-ui>
</template>
<script lang="ts">
import Vue from 'vue';
export default Vue.extend({
data() {
return {
fetching: true,
list: null
};
},
watch: {
$route: 'fetch'
},
mounted() {
this.fetch();
},
methods: {
fetch() {
this.fetching = true;
(this as any).api('users/lists/show', {
2018-04-25 05:53:16 -05:00
listId: this.$route.params.list
2018-04-24 22:36:54 -05:00
}).then(list => {
this.list = list;
this.fetching = false;
});
}
}
});
</script>
2018-04-25 06:20:02 -05:00
<style lang="stylus" scoped>
[data-id="02010e15-cc48-4245-8636-16078a9b623c"]
display flex
justify-content center
2018-04-24 22:36:54 -05:00
margin 0 auto
2018-04-25 06:20:02 -05:00
max-width 1200px
2018-04-24 22:36:54 -05:00
2018-04-25 06:20:02 -05:00
> main
> div > div
> *:not(:last-child)
margin-bottom 16px
2018-04-24 22:36:54 -05:00
2018-04-25 06:20:02 -05:00
> main
padding 16px
width calc(100% - 275px * 2)
2018-04-24 22:36:54 -05:00
2018-04-25 06:20:02 -05:00
> div
width 275px
margin 0
padding 16px 0 16px 16px
2018-04-24 22:36:54 -05:00
</style>