hippofish/src/client/app/mobile/views/pages/user/home.vue

63 lines
1.6 KiB
Vue
Raw Normal View History

2018-02-15 10:33:34 +01:00
<template>
2019-02-18 19:38:34 +01:00
<div class="wojmldye">
<mk-note-detail class="note" v-for="n in user.pinnedNotes" :key="n.id" :note="n" :compact="true"/>
<ui-container :body-togglable="true">
<template #header><fa :icon="['far', 'comments']"/>{{ $t('recent-notes') }}</template>
2018-02-15 10:33:34 +01:00
<div>
2018-04-07 19:30:37 +02:00
<x-notes :user="user"/>
2018-02-15 10:33:34 +01:00
</div>
2019-02-18 19:38:34 +01:00
</ui-container>
<ui-container :body-togglable="true">
<template #header><fa icon="image"/>{{ $t('images') }}</template>
2018-02-15 10:33:34 +01:00
<div>
2018-02-22 09:32:58 +01:00
<x-photos :user="user"/>
2018-02-15 10:33:34 +01:00
</div>
2019-02-18 19:38:34 +01:00
</ui-container>
<ui-container :body-togglable="true">
<template #header><fa icon="chart-bar"/>{{ $t('activity') }}</template>
<div style="padding:8px;">
2018-11-13 15:06:31 +01:00
<x-activity :user="user"/>
2018-02-15 10:33:34 +01:00
</div>
2019-02-18 19:38:34 +01:00
</ui-container>
2018-02-15 10:33:34 +01:00
</div>
</template>
<script lang="ts">
import Vue from 'vue';
import i18n from '../../../../i18n';
2018-04-07 19:30:37 +02:00
import XNotes from './home.notes.vue';
2018-02-22 09:32:58 +01:00
import XPhotos from './home.photos.vue';
2018-02-15 10:33:34 +01:00
export default Vue.extend({
i18n: i18n('mobile/views/pages/user/home.vue'),
2018-02-22 09:32:58 +01:00
components: {
2018-04-07 19:30:37 +02:00
XNotes,
2018-02-22 09:32:58 +01:00
XPhotos,
XActivity: () => import('../../../../common/views/components/activity.vue').then(m => m.default)
2018-02-22 09:32:58 +01:00
},
2019-02-18 19:38:34 +01:00
props: ['user'],
data() {
return {
makeFrequentlyRepliedUsersPromise: () => this.$root.api('users/get_frequently_replied_users', {
userId: this.user.id
}).then(res => res.map(x => x.user)),
makeFollowersYouKnowPromise: () => this.$root.api('users/followers', {
userId: this.user.id,
iknow: true,
limit: 30
}).then(res => res.users),
};
}
2018-02-15 10:33:34 +01:00
});
</script>
<style lang="stylus" scoped>
2019-02-18 19:38:34 +01:00
.wojmldye
> .note
2018-02-15 10:33:34 +01:00
margin 0 0 8px 0
@media (min-width 500px)
margin 0 0 16px 0
2018-02-15 10:33:34 +01:00
</style>