From b502627494077700401af28a2e87e5e9ffebeda9 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 23 Jun 2018 23:18:39 +0900 Subject: [PATCH] Fix nado --- .../desktop/views/pages/user/user.header.vue | 18 +++++++++++++----- .../desktop/views/pages/user/user.profile.vue | 8 +------- .../app/desktop/views/pages/user/user.vue | 2 +- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/client/app/desktop/views/pages/user/user.header.vue b/src/client/app/desktop/views/pages/user/user.header.vue index ab0880d9b..00545723e 100644 --- a/src/client/app/desktop/views/pages/user/user.header.vue +++ b/src/client/app/desktop/views/pages/user/user.header.vue @@ -6,10 +6,10 @@

{{ user | userName }}

-

%fa:robot%

-

-

%fa:map-marker% {{ user.profile.location }}

-

%fa:birthday-cake% {{ user.profile.birthday.replace('-', '年').replace('-', '月') + '日' }} ({{ age }}歳)

+ + %fa:robot% + %fa:map-marker% {{ user.profile.location }} + %fa:birthday-cake% {{ user.profile.birthday.replace('-', '年').replace('-', '月') + '日' }} ({{ age }}歳)
@@ -31,6 +31,7 @@ import Vue from 'vue'; import MkFollowingWindow from '../../components/following-window.vue'; import MkFollowersWindow from '../../components/followers-window.vue'; +import * as age from 's-age'; export default Vue.extend({ 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, backgroundImage: `url(${ this.user.bannerUrl })` }; + }, + + age(): number { + return age(this.user.profile.birthday); } }, mounted() { @@ -154,10 +159,13 @@ root(isDark) > div > * display inline-block - margin 0 16px 0 0 + margin-right 16px line-height 20px opacity 0.8 + &.username + font-weight bold + > .avatar display block position absolute diff --git a/src/client/app/desktop/views/pages/user/user.profile.vue b/src/client/app/desktop/views/pages/user/user.profile.vue index fda1db284..0134d6f0b 100644 --- a/src/client/app/desktop/views/pages/user/user.profile.vue +++ b/src/client/app/desktop/views/pages/user/user.profile.vue @@ -20,18 +20,12 @@