mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-28 06:33:08 +02:00
wip
This commit is contained in:
parent
469ff88287
commit
62152bfa6f
6 changed files with 40 additions and 37 deletions
|
@ -5,10 +5,10 @@
|
|||
</template>
|
||||
<div class="user" v-if="!loading && users.length != 0" each={ _user in users }>
|
||||
<a class="avatar-anchor" href={ '/' + _user.username }>
|
||||
<img class="avatar" src={ _user.avatar_url + '?thumbnail&size=42' } alt="" data-user-preview={ _user.id }/>
|
||||
<img class="avatar" src={ _user.avatar_url + '?thumbnail&size=42' } alt="" v-user-preview={ _user.id }/>
|
||||
</a>
|
||||
<div class="body">
|
||||
<a class="name" href={ '/' + _user.username } data-user-preview={ _user.id }>{ _user.name }</a>
|
||||
<a class="name" href={ '/' + _user.username } v-user-preview={ _user.id }>{ _user.name }</a>
|
||||
<p class="username">@{ _user.username }</p>
|
||||
</div>
|
||||
<mk-follow-button user={ _user }/>
|
||||
|
|
|
@ -32,6 +32,7 @@ import driveFile from './drive-file.vue';
|
|||
import driveFolder from './drive-folder.vue';
|
||||
import driveNavFolder from './drive-nav-folder.vue';
|
||||
import contextMenuMenu from './context-menu-menu.vue';
|
||||
import postDetail from './post-detail.vue';
|
||||
import wNav from './widgets/nav.vue';
|
||||
import wCalendar from './widgets/calendar.vue';
|
||||
import wPhotoStream from './widgets/photo-stream.vue';
|
||||
|
@ -72,6 +73,7 @@ Vue.component('mk-drive-file', driveFile);
|
|||
Vue.component('mk-drive-folder', driveFolder);
|
||||
Vue.component('mk-drive-nav-folder', driveNavFolder);
|
||||
Vue.component('context-menu-menu', contextMenuMenu);
|
||||
Vue.component('post-detail', postDetail);
|
||||
Vue.component('mkw-nav', wNav);
|
||||
Vue.component('mkw-calendar', wCalendar);
|
||||
Vue.component('mkw-photo-stream', wPhotoStream);
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<div class="mk-post-detail-sub" :title="title">
|
||||
<a class="avatar-anchor" href={ '/' + post.user.username }>
|
||||
<img class="avatar" src={ post.user.avatar_url + '?thumbnail&size=64' } alt="avatar" data-user-preview={ post.user_id }/>
|
||||
<img class="avatar" src={ post.user.avatar_url + '?thumbnail&size=64' } alt="avatar" v-user-preview={ post.user_id }/>
|
||||
</a>
|
||||
<div class="main">
|
||||
<header>
|
||||
<div class="left">
|
||||
<a class="name" href={ '/' + post.user.username } data-user-preview={ post.user_id }>{ post.user.name }</a>
|
||||
<a class="name" href={ '/' + post.user.username } v-user-preview={ post.user_id }>{ post.user.name }</a>
|
||||
<span class="username">@{ post.user.username }</span>
|
||||
</div>
|
||||
<div class="right">
|
||||
|
|
|
@ -1,57 +1,60 @@
|
|||
<template>
|
||||
<div class="mk-post-detail" :title="title">
|
||||
<button class="read-more" v-if="p.reply && p.reply.reply_id && context == null" title="会話をもっと読み込む" @click="loadContext" disabled={ contextFetching }>
|
||||
<button
|
||||
class="read-more"
|
||||
v-if="p.reply && p.reply.reply_id && context == null"
|
||||
title="会話をもっと読み込む"
|
||||
@click="loadContext"
|
||||
:disabled="contextFetching"
|
||||
>
|
||||
<template v-if="!contextFetching">%fa:ellipsis-v%</template>
|
||||
<template v-if="contextFetching">%fa:spinner .pulse%</template>
|
||||
</button>
|
||||
<div class="context">
|
||||
<template each={ post in context }>
|
||||
<mk-post-detail-sub post={ post }/>
|
||||
</template>
|
||||
<mk-post-detail-sub v-for="post in context" :key="post.id" :post="post"/>
|
||||
</div>
|
||||
<div class="reply-to" v-if="p.reply">
|
||||
<mk-post-detail-sub post={ p.reply }/>
|
||||
<mk-post-detail-sub :post="p.reply"/>
|
||||
</div>
|
||||
<div class="repost" v-if="isRepost">
|
||||
<p>
|
||||
<a class="avatar-anchor" href={ '/' + post.user.username } data-user-preview={ post.user_id }>
|
||||
<img class="avatar" src={ post.user.avatar_url + '?thumbnail&size=32' } alt="avatar"/>
|
||||
</a>
|
||||
%fa:retweet%<a class="name" href={ '/' + post.user.username }>
|
||||
{ post.user.name }
|
||||
</a>
|
||||
がRepost
|
||||
</p>
|
||||
<router-link class="avatar-anchor" :to="`/${post.user.username}`" v-user-preview="post.user_id">
|
||||
<img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=32`" alt="avatar"/>
|
||||
</router-link>
|
||||
%fa:retweet%
|
||||
<router-link class="name" :href="`/${post.user.username}`">{{ post.user.name }}</router-link>
|
||||
がRepost
|
||||
</p>
|
||||
</div>
|
||||
<article>
|
||||
<a class="avatar-anchor" href={ '/' + p.user.username }>
|
||||
<img class="avatar" src={ p.user.avatar_url + '?thumbnail&size=64' } alt="avatar" data-user-preview={ p.user.id }/>
|
||||
</a>
|
||||
<router-link class="avatar-anchor" :to="`/${p.user.username}`">
|
||||
<img class="avatar" :src="`${p.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="p.user.id"/>
|
||||
</router-link>
|
||||
<header>
|
||||
<a class="name" href={ '/' + p.user.username } data-user-preview={ p.user.id }>{ p.user.name }</a>
|
||||
<span class="username">@{ p.user.username }</span>
|
||||
<a class="time" href={ '/' + p.user.username + '/' + p.id }>
|
||||
<mk-time time={ p.created_at }/>
|
||||
</a>
|
||||
<router-link class="name" :to="`/${p.user.username}`" v-user-preview="p.user.id">{{ p.user.name }}</router-link>
|
||||
<span class="username">@{{ p.user.username }}</span>
|
||||
<router-link class="time" :to="`/${p.user.username}/${p.id}`">
|
||||
<mk-time :time="p.created_at"/>
|
||||
</router-link>
|
||||
</header>
|
||||
<div class="body">
|
||||
<mk-post-html v-if="p.ast" :ast="p.ast" :i="os.i"/>
|
||||
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
|
||||
<div class="media" v-if="p.media">
|
||||
<mk-images images={ p.media }/>
|
||||
<mk-images :images="p.media"/>
|
||||
</div>
|
||||
<mk-poll v-if="p.poll" post={ p }/>
|
||||
<mk-poll v-if="p.poll" :post="p"/>
|
||||
</div>
|
||||
<footer>
|
||||
<mk-reactions-viewer post={ p }/>
|
||||
<mk-reactions-viewer :post="p"/>
|
||||
<button @click="reply" title="返信">
|
||||
%fa:reply%<p class="count" v-if="p.replies_count > 0">{ p.replies_count }</p>
|
||||
%fa:reply%<p class="count" v-if="p.replies_count > 0">{{ p.replies_count }}</p>
|
||||
</button>
|
||||
<button @click="repost" title="Repost">
|
||||
%fa:retweet%<p class="count" v-if="p.repost_count > 0">{ p.repost_count }</p>
|
||||
%fa:retweet%<p class="count" v-if="p.repost_count > 0">{{ p.repost_count }}</p>
|
||||
</button>
|
||||
<button :class="{ reacted: p.my_reaction != null }" @click="react" ref="reactButton" title="リアクション">
|
||||
%fa:plus%<p class="count" v-if="p.reactions_count > 0">{ p.reactions_count }</p>
|
||||
%fa:plus%<p class="count" v-if="p.reactions_count > 0">{{ p.reactions_count }}</p>
|
||||
</button>
|
||||
<button @click="menu" ref="menuButton">
|
||||
%fa:ellipsis-h%
|
||||
|
@ -59,9 +62,7 @@
|
|||
</footer>
|
||||
</article>
|
||||
<div class="replies" v-if="!compact">
|
||||
<template each={ post in replies }>
|
||||
<mk-post-detail-sub post={ post }/>
|
||||
</template>
|
||||
<mk-post-detail-sub v-for="post in nreplies" :key="post.id" :post="post"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<h1>%fa:heart%%i18n:desktop.tags.mk-donation-home-widget.title%</h1>
|
||||
<p>
|
||||
{{ '%i18n:desktop.tags.mk-donation-home-widget.text%'.substr(0, '%i18n:desktop.tags.mk-donation-home-widget.text%'.indexOf('{')) }}
|
||||
<a href="/syuilo" data-user-preview="@syuilo">@syuilo</a>
|
||||
<a href="/syuilo" v-user-preview="@syuilo">@syuilo</a>
|
||||
{{ '%i18n:desktop.tags.mk-donation-home-widget.text%'.substr('%i18n:desktop.tags.mk-donation-home-widget.text%'.indexOf('}') + 1) }}
|
||||
</p>
|
||||
</article>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<p class="initializing" v-if="fetching">%fa:spinner .pulse .fw%%i18n:desktop.tags.mk-user.frequently-replied-users.loading%<mk-ellipsis/></p>
|
||||
<div class="user" v-if="!fetching && users.length != 0" each={ _user in users }>
|
||||
<a class="avatar-anchor" href={ '/' + _user.username }>
|
||||
<img class="avatar" src={ _user.avatar_url + '?thumbnail&size=42' } alt="" data-user-preview={ _user.id }/>
|
||||
<img class="avatar" src={ _user.avatar_url + '?thumbnail&size=42' } alt="" v-user-preview={ _user.id }/>
|
||||
</a>
|
||||
<div class="body">
|
||||
<a class="name" href={ '/' + _user.username } data-user-preview={ _user.id }>{ _user.name }</a>
|
||||
<a class="name" href={ '/' + _user.username } v-user-preview={ _user.id }>{ _user.name }</a>
|
||||
<p class="username">@{ _user.username }</p>
|
||||
</div>
|
||||
<mk-follow-button user={ _user }/>
|
||||
|
|
Loading…
Reference in a new issue