mizzkey/src/client/app/desktop/views/pages/user-list.vue

72 lines
1.1 KiB
Vue
Raw Normal View History

2018-04-25 05:36:54 +02:00
<template>
<mk-ui>
2018-04-25 13:20:02 +02:00
<div v-if="!fetching" data-id="02010e15-cc48-4245-8636-16078a9b623c">
<div>
<div><h1>{{ list.title }}</h1></div>
2018-04-25 15:37:08 +02:00
<x-users :list="list"/>
2018-04-25 13:20:02 +02:00
</div>
<main>
<mk-user-list-timeline :list="list"/>
</main>
</div>
2018-04-25 05:36:54 +02:00
</mk-ui>
</template>
<script lang="ts">
import Vue from 'vue';
2018-04-25 15:37:08 +02:00
import XUsers from './user-list.users.vue';
2018-04-25 05:36:54 +02:00
export default Vue.extend({
2018-04-25 15:37:08 +02:00
components: {
XUsers
},
2018-04-25 05:36:54 +02:00
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 12:53:16 +02:00
listId: this.$route.params.list
2018-04-25 05:36:54 +02:00
}).then(list => {
this.list = list;
this.fetching = false;
});
}
}
});
</script>
2018-04-25 13:20:02 +02:00
<style lang="stylus" scoped>
[data-id="02010e15-cc48-4245-8636-16078a9b623c"]
display flex
justify-content center
2018-04-25 05:36:54 +02:00
margin 0 auto
2018-04-25 13:20:02 +02:00
max-width 1200px
2018-04-25 05:36:54 +02:00
2018-04-25 13:20:02 +02:00
> main
> div > div
> *:not(:last-child)
margin-bottom 16px
2018-04-25 05:36:54 +02:00
2018-04-25 13:20:02 +02:00
> main
padding 16px
width calc(100% - 275px * 2)
2018-04-25 05:36:54 +02:00
2018-04-25 13:20:02 +02:00
> div
width 275px
margin 0
padding 16px 0 16px 16px
2018-04-25 05:36:54 +02:00
</style>