2018-05-29 19:45:27 +00:00
|
|
|
<template>
|
|
|
|
<mk-ui>
|
2018-11-05 16:40:11 +00:00
|
|
|
<span slot="header" v-if="!fetching"><fa icon="list"/>{{ list.title }}</span>
|
2018-05-29 19:45:27 +00:00
|
|
|
|
|
|
|
<main v-if="!fetching">
|
2018-12-18 22:22:01 +00:00
|
|
|
<x-editor :list="list"/>
|
2018-05-29 19:45:27 +00:00
|
|
|
</main>
|
|
|
|
</mk-ui>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
|
|
|
import Progress from '../../../common/scripts/loading';
|
2018-12-18 22:22:01 +00:00
|
|
|
import XEditor from '../../../common/views/components/user-list-editor.vue';
|
2018-05-29 19:45:27 +00:00
|
|
|
|
|
|
|
export default Vue.extend({
|
2018-12-18 22:22:01 +00:00
|
|
|
components: {
|
|
|
|
XEditor
|
|
|
|
},
|
2018-05-29 19:45:27 +00:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
fetching: true,
|
2018-12-18 22:22:01 +00:00
|
|
|
list: null
|
2018-05-29 19:45:27 +00:00
|
|
|
};
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
$route: 'fetch'
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
this.fetch();
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
fetch() {
|
|
|
|
Progress.start();
|
|
|
|
this.fetching = true;
|
|
|
|
|
2018-11-08 23:13:34 +00:00
|
|
|
this.$root.api('users/lists/show', {
|
2018-05-29 19:45:27 +00:00
|
|
|
listId: this.$route.params.list
|
|
|
|
}).then(list => {
|
|
|
|
this.list = list;
|
|
|
|
this.fetching = false;
|
|
|
|
|
|
|
|
Progress.done();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
main
|
|
|
|
width 100%
|
|
|
|
max-width 680px
|
|
|
|
margin 0 auto
|
|
|
|
padding 8px
|
|
|
|
|
|
|
|
@media (min-width 500px)
|
|
|
|
padding 16px
|
|
|
|
|
|
|
|
@media (min-width 600px)
|
|
|
|
padding 32px
|
|
|
|
|
|
|
|
</style>
|