2019-05-17 19:56:47 +09:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<ui-container :body-togglable="true">
|
|
|
|
<template #header><fa :icon="faEdit" fixed-width/>{{ $t('my-pages') }}</template>
|
2019-05-21 06:31:51 +09:00
|
|
|
<div class="rknalgpo my">
|
2019-05-17 19:56:47 +09:00
|
|
|
<ui-button class="new" @click="create()"><fa :icon="faPlus"/></ui-button>
|
2019-05-21 06:31:51 +09:00
|
|
|
<ui-pagination :pagination="myPagesPagination" #default="{items}">
|
|
|
|
<x-page-preview v-for="page in items" class="ckltabjg" :page="page" :key="page.id"/>
|
|
|
|
</ui-pagination>
|
2019-05-17 19:56:47 +09:00
|
|
|
</div>
|
|
|
|
</ui-container>
|
|
|
|
|
|
|
|
<ui-container :body-togglable="true">
|
|
|
|
<template #header><fa :icon="faHeart" fixed-width/>{{ $t('liked-pages') }}</template>
|
2019-05-21 06:31:51 +09:00
|
|
|
<div class="rknalgpo">
|
|
|
|
<ui-pagination :pagination="likedPagesPagination" #default="{items}">
|
|
|
|
<x-page-preview v-for="like in items" class="ckltabjg" :page="like.page" :key="like.page.id"/>
|
|
|
|
</ui-pagination>
|
2019-05-17 19:56:47 +09:00
|
|
|
</div>
|
|
|
|
</ui-container>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
|
|
|
import { faPlus, faEdit } from '@fortawesome/free-solid-svg-icons';
|
|
|
|
import { faStickyNote, faHeart } from '@fortawesome/free-regular-svg-icons';
|
|
|
|
import i18n from '../../../i18n';
|
|
|
|
import XPagePreview from '../../views/components/page-preview.vue';
|
|
|
|
|
|
|
|
export default Vue.extend({
|
|
|
|
i18n: i18n('pages'),
|
|
|
|
components: {
|
|
|
|
XPagePreview
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
2019-05-21 06:31:51 +09:00
|
|
|
myPagesPagination: {
|
|
|
|
endpoint: 'i/pages',
|
|
|
|
limit: 5,
|
|
|
|
},
|
|
|
|
likedPagesPagination: {
|
|
|
|
endpoint: 'i/page-likes',
|
|
|
|
limit: 5,
|
|
|
|
},
|
2019-05-17 19:56:47 +09:00
|
|
|
faStickyNote, faPlus, faEdit, faHeart
|
|
|
|
};
|
|
|
|
},
|
|
|
|
created() {
|
2019-05-18 20:36:33 +09:00
|
|
|
this.$emit('init', {
|
|
|
|
title: this.$t('@.pages'),
|
|
|
|
icon: faStickyNote
|
|
|
|
});
|
2019-05-17 19:56:47 +09:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
create() {
|
|
|
|
this.$router.push(`/i/pages/new`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
.rknalgpo
|
|
|
|
padding 16px
|
|
|
|
|
2019-05-21 06:31:51 +09:00
|
|
|
&.my .ckltabjg:first-child
|
|
|
|
margin-top 16px
|
2019-05-17 19:56:47 +09:00
|
|
|
|
2019-05-21 06:31:51 +09:00
|
|
|
.ckltabjg:not(:last-child)
|
2019-05-17 19:56:47 +09:00
|
|
|
margin-bottom 8px
|
|
|
|
|
|
|
|
@media (min-width 500px)
|
2019-05-21 06:31:51 +09:00
|
|
|
.ckltabjg:not(:last-child)
|
2019-05-17 19:56:47 +09:00
|
|
|
margin-bottom 16px
|
|
|
|
|
|
|
|
</style>
|