mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 19:23:08 +02:00
Fix nado
This commit is contained in:
parent
a8017369d0
commit
b502627494
3 changed files with 15 additions and 13 deletions
|
@ -6,10 +6,10 @@
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<p class="name">{{ user | userName }}</p>
|
<p class="name">{{ user | userName }}</p>
|
||||||
<div>
|
<div>
|
||||||
<p v-if="user.isBot" title="%i18n:@is-bot%">%fa:robot%</p>
|
<span class="username"><mk-acct :user="user"/></span>
|
||||||
<p class="username"><mk-acct :user="user"/></p>
|
<span v-if="user.isBot" title="%i18n:@is-bot%">%fa:robot%</span>
|
||||||
<p class="location" v-if="user.host === null && user.profile.location">%fa:map-marker% {{ user.profile.location }}</p>
|
<span class="location" v-if="user.host === null && user.profile.location">%fa:map-marker% {{ user.profile.location }}</span>
|
||||||
<p class="birthday" v-if="user.host === null && user.profile.birthday">%fa:birthday-cake% {{ user.profile.birthday.replace('-', '年').replace('-', '月') + '日' }} ({{ age }}歳)</p>
|
<span class="birthday" v-if="user.host === null && user.profile.birthday">%fa:birthday-cake% {{ user.profile.birthday.replace('-', '年').replace('-', '月') + '日' }} ({{ age }}歳)</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -31,6 +31,7 @@
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
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';
|
||||||
|
import * as age from 's-age';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: ['user'],
|
props: ['user'],
|
||||||
|
@ -41,6 +42,10 @@ export default Vue.extend({
|
||||||
backgroundColor: this.user.bannerColor && this.user.bannerColor.length == 3 ? `rgb(${ this.user.bannerColor.join(',') })` : null,
|
backgroundColor: this.user.bannerColor && this.user.bannerColor.length == 3 ? `rgb(${ this.user.bannerColor.join(',') })` : null,
|
||||||
backgroundImage: `url(${ this.user.bannerUrl })`
|
backgroundImage: `url(${ this.user.bannerUrl })`
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
age(): number {
|
||||||
|
return age(this.user.profile.birthday);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -154,10 +159,13 @@ root(isDark)
|
||||||
> div
|
> div
|
||||||
> *
|
> *
|
||||||
display inline-block
|
display inline-block
|
||||||
margin 0 16px 0 0
|
margin-right 16px
|
||||||
line-height 20px
|
line-height 20px
|
||||||
opacity 0.8
|
opacity 0.8
|
||||||
|
|
||||||
|
&.username
|
||||||
|
font-weight bold
|
||||||
|
|
||||||
> .avatar
|
> .avatar
|
||||||
display block
|
display block
|
||||||
position absolute
|
position absolute
|
||||||
|
|
|
@ -20,18 +20,12 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import * as age from 's-age';
|
|
||||||
import MkUserListsWindow from '../../components/user-lists-window.vue';
|
import MkUserListsWindow from '../../components/user-lists-window.vue';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: ['user'],
|
props: ['user'],
|
||||||
computed: {
|
|
||||||
age(): number {
|
|
||||||
return age(this.user.profile.birthday);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
|
methods: {
|
||||||
stalk() {
|
stalk() {
|
||||||
(this as any).api('following/stalk', {
|
(this as any).api('following/stalk', {
|
||||||
userId: this.user.id
|
userId: this.user.id
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="side">
|
<div class="side">
|
||||||
<x-profile :user="user"/>
|
<x-profile :user="user"/>
|
||||||
<a-twitter :user="user" v-if="user.host === null && user.twitter"/>
|
<x-twitter :user="user" v-if="user.host === null && user.twitter"/>
|
||||||
<mk-calendar @chosen="warp" :start="new Date(user.createdAt)"/>
|
<mk-calendar @chosen="warp" :start="new Date(user.createdAt)"/>
|
||||||
<mk-activity :user="user"/>
|
<mk-activity :user="user"/>
|
||||||
<x-photos :user="user"/>
|
<x-photos :user="user"/>
|
||||||
|
|
Loading…
Reference in a new issue