1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-11-27 22:38:30 +09:00
This commit is contained in:
syuilo 2019-02-20 01:00:59 +09:00
parent 1b8467d5e5
commit 7921f8cd43
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
2 changed files with 49 additions and 39 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<button class="wfliddvnhxvyusikowhxozkyxyenqxqr" <button class="wfliddvnhxvyusikowhxozkyxyenqxqr"
:class="{ wait, block, inline, mini, active: isFollowing || hasPendingFollowRequestFromYou }" :class="{ wait, block, inline, mini, transparent, active: isFollowing || hasPendingFollowRequestFromYou }"
@click="onClick" @click="onClick"
:disabled="wait" :disabled="wait"
:inline="inline" :inline="inline"
@ -38,7 +38,12 @@ export default Vue.extend({
type: Boolean, type: Boolean,
required: false, required: false,
default: false default: false
} },
transparent: {
type: Boolean,
required: false,
default: true
},
}, },
data() { data() {
@ -134,6 +139,9 @@ export default Vue.extend({
border solid 1px var(--primary) border solid 1px var(--primary)
border-radius 36px border-radius 36px
&:not(.transparent)
background #fff
&.inline &.inline
display inline-block display inline-block

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="header" :data-is-dark-background="user.bannerUrl != null"> <div class="header">
<div class="banner-container" :style="style"> <div class="banner-container" :style="style">
<div class="banner" ref="banner" :style="style" @click="onBannerClick"></div> <div class="banner" ref="banner" :style="style" @click="onBannerClick"></div>
<div class="fade"></div> <div class="fade"></div>
@ -12,16 +12,14 @@
<span v-if="user.isBot" :title="$t('is-bot')"><fa icon="robot"/></span> <span v-if="user.isBot" :title="$t('is-bot')"><fa icon="robot"/></span>
</div> </div>
</div> </div>
<span class="followed" v-if="$store.getters.isSignedIn && $store.state.i.id != user.id && user.isFollowed">{{ $t('follows-you') }}</span>
<div class="actions" v-if="$store.getters.isSignedIn">
<button @click="menu" class="menu" ref="menu"><fa icon="ellipsis-h"/></button>
<mk-follow-button v-if="$store.state.i.id != user.id" :user="user" :inline="true" :transparent="false" class="follow"/>
</div>
</div> </div>
<mk-avatar class="avatar" :user="user" :disable-preview="true"/> <mk-avatar class="avatar" :user="user" :disable-preview="true"/>
<div class="body"> <div class="body">
<div class="actions" v-if="$store.getters.isSignedIn">
<template v-if="$store.state.i.id != user.id">
<span class="followed" v-if="user.isFollowed">{{ $t('follows-you') }}</span>
<mk-follow-button :user="user" :inline="true" class="follow"/>
</template>
<ui-button @click="menu" ref="menu" :inline="true"><fa icon="ellipsis-h"/></ui-button>
</div>
<div class="description"> <div class="description">
<mfm v-if="user.description" :text="user.description" :is-note="false" :author="user" :i="$store.state.i" :custom-emojis="user.emojis"/> <mfm v-if="user.description" :text="user.description" :is-note="false" :author="user" :i="$store.state.i" :custom-emojis="user.emojis"/>
</div> </div>
@ -111,7 +109,7 @@ export default Vue.extend({
menu() { menu() {
this.$root.new(XUserMenu, { this.$root.new(XUserMenu, {
source: this.$refs.menu.$el, source: this.$refs.menu,
user: this.user user: this.user
}); });
} }
@ -126,20 +124,6 @@ export default Vue.extend({
border-radius var(--round) border-radius var(--round)
overflow hidden overflow hidden
&[data-is-dark-background]
> .banner-container
> .banner
background-color #383838
> .fade
background linear-gradient(transparent, rgba(#000, 0.7))
> .title
color #fff
> .name
text-shadow 0 0 8px #000
> .banner-container > .banner-container
height 250px height 250px
overflow hidden overflow hidden
@ -148,9 +132,10 @@ export default Vue.extend({
> .banner > .banner
height 100% height 100%
background-color #bfccd0 background-color #383838
background-size cover background-size cover
background-position center background-position center
box-shadow 0 0 128px rgba(0, 0, 0, 0.5) inset
> .fade > .fade
position absolute position absolute
@ -158,6 +143,31 @@ export default Vue.extend({
left 0 left 0
width 100% width 100%
height 78px height 78px
background linear-gradient(transparent, rgba(#000, 0.7))
> .followed
position absolute
top 12px
left 12px
padding 4px 6px
color #fff
background rgba(0, 0, 0, 0.7)
font-size 12px
> .actions
position absolute
top 12px
right 12px
> .menu
height 100%
display block
position absolute
left -42px
padding 0 14px
color #fff
text-shadow 0 0 8px #000
font-size 16px
> .title > .title
position absolute position absolute
@ -165,7 +175,7 @@ export default Vue.extend({
left 0 left 0
width 100% width 100%
padding 0 0 8px 154px padding 0 0 8px 154px
color #5e6367 color #fff
> .name > .name
display block display block
@ -173,6 +183,7 @@ export default Vue.extend({
line-height 32px line-height 32px
font-weight bold font-weight bold
font-size 1.8em font-size 1.8em
text-shadow 0 0 8px #000
> div > div
> * > *
@ -202,18 +213,6 @@ export default Vue.extend({
padding 16px 16px 16px 154px padding 16px 16px 16px 154px
color var(--text) color var(--text)
> .actions
text-align right
padding-bottom 16px
margin-bottom 16px
border-bottom solid 1px var(--faceDivider)
> *
margin-left 8px
> .follow
width 180px
> .fields > .fields
margin-top 16px margin-top 16px
@ -247,6 +246,9 @@ export default Vue.extend({
padding-top 16px padding-top 16px
border-top solid 1px var(--faceDivider) border-top solid 1px var(--faceDivider)
&:empty
display none
> * > *
margin-right 16px margin-right 16px