This commit is contained in:
syuilo 2018-02-22 23:05:05 +09:00
parent 4b228432c1
commit e98626dbbc
8 changed files with 22 additions and 10 deletions

View File

@ -3,7 +3,7 @@
<span slot="header" :class="$style.header"> <span slot="header" :class="$style.header">
<img :src="`${user.avatar_url}?thumbnail&size=64`" alt=""/>{{ user.name }}のフォロワー <img :src="`${user.avatar_url}?thumbnail&size=64`" alt=""/>{{ user.name }}のフォロワー
</span> </span>
<mk-followers-list :user="user"/> <mk-followers :user="user"/>
</mk-window> </mk-window>
</template> </template>

View File

@ -3,7 +3,7 @@
<span slot="header" :class="$style.header"> <span slot="header" :class="$style.header">
<img :src="`${user.avatar_url}?thumbnail&size=64`" alt=""/>{{ user.name }}のフォロー <img :src="`${user.avatar_url}?thumbnail&size=64`" alt=""/>{{ user.name }}のフォロー
</span> </span>
<mk-following-list :user="user"/> <mk-following :user="user"/>
</mk-window> </mk-window>
</template> </template>

View File

@ -27,6 +27,9 @@ import settings from './settings.vue';
import calendar from './calendar.vue'; import calendar from './calendar.vue';
import activity from './activity.vue'; import activity from './activity.vue';
import friendsMaker from './friends-maker.vue'; import friendsMaker from './friends-maker.vue';
import followers from './followers.vue';
import following from './following.vue';
import usersList from './users-list.vue';
import wNav from './widgets/nav.vue'; import wNav from './widgets/nav.vue';
import wCalendar from './widgets/calendar.vue'; import wCalendar from './widgets/calendar.vue';
import wPhotoStream from './widgets/photo-stream.vue'; import wPhotoStream from './widgets/photo-stream.vue';
@ -76,6 +79,9 @@ Vue.component('mk-settings', settings);
Vue.component('mk-calendar', calendar); Vue.component('mk-calendar', calendar);
Vue.component('mk-activity', activity); Vue.component('mk-activity', activity);
Vue.component('mk-friends-maker', friendsMaker); Vue.component('mk-friends-maker', friendsMaker);
Vue.component('mk-followers', followers);
Vue.component('mk-following', following);
Vue.component('mk-users-list', usersList);
Vue.component('mkw-nav', wNav); Vue.component('mkw-nav', wNav);
Vue.component('mkw-calendar', wCalendar); Vue.component('mkw-calendar', wCalendar);
Vue.component('mkw-photo-stream', wPhotoStream); Vue.component('mkw-photo-stream', wPhotoStream);

View File

@ -1,11 +1,11 @@
<template> <template>
<div class="mk-list-user"> <div class="root item">
<a class="avatar-anchor" :href="`/${user.username}`"> <router-link class="avatar-anchor" :to="`/${user.username}`" v-user-preview="user.id">
<img class="avatar" :src="`${user.avatar_url}?thumbnail&size=64`" alt="avatar"/> <img class="avatar" :src="`${user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
</a> </router-link>
<div class="main"> <div class="main">
<header> <header>
<a class="name" :href="`/${user.username}`">{{ user.name }}</a> <router-link class="name" :to="`/${user.username}`" v-user-preview="user.id">{{ user.name }}</router-link>
<span class="username">@{{ user.username }}</span> <span class="username">@{{ user.username }}</span>
</header> </header>
<div class="body"> <div class="body">
@ -25,8 +25,7 @@ export default Vue.extend({
</script> </script>
<style lang="stylus" scoped> <style lang="stylus" scoped>
.mk-list-user .root.item
margin 0
padding 16px padding 16px
font-size 16px font-size 16px

View File

@ -8,7 +8,7 @@
</nav> </nav>
<div class="users" v-if="!fetching && users.length != 0"> <div class="users" v-if="!fetching && users.length != 0">
<div v-for="u in users" :key="u.id"> <div v-for="u in users" :key="u.id">
<mk-list-user :user="u"/> <x-item :user="u"/>
</div> </div>
</div> </div>
<button class="more" v-if="!fetching && next != null" @click="more" :disabled="moreFetching"> <button class="more" v-if="!fetching && next != null" @click="more" :disabled="moreFetching">
@ -24,7 +24,12 @@
<script lang="ts"> <script lang="ts">
import Vue from 'vue'; import Vue from 'vue';
import XItem from './users-list.item.vue';
export default Vue.extend({ export default Vue.extend({
components: {
XItem
},
props: ['fetch', 'count', 'youKnowCount'], props: ['fetch', 'count', 'youKnowCount'],
data() { data() {
return { return {

View File

@ -23,7 +23,7 @@
<script lang="ts"> <script lang="ts">
import Vue from 'vue'; import Vue from 'vue';
import age from 's-age'; import * as age from 's-age';
import MkFollowingWindow from '../../components/following-window.vue'; import MkFollowingWindow from '../../components/following-window.vue';
import MkFollowersWindow from '../../components/followers-window.vue'; import MkFollowersWindow from '../../components/followers-window.vue';
@ -37,6 +37,7 @@ export default Vue.extend({
methods: { methods: {
showFollowing() { showFollowing() {
document.body.appendChild(new MkFollowingWindow({ document.body.appendChild(new MkFollowingWindow({
parent: this,
propsData: { propsData: {
user: this.user user: this.user
} }
@ -45,6 +46,7 @@ export default Vue.extend({
showFollowers() { showFollowers() {
document.body.appendChild(new MkFollowersWindow({ document.body.appendChild(new MkFollowersWindow({
parent: this,
propsData: { propsData: {
user: this.user user: this.user
} }