1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-01 23:55:58 +09:00

Fix glitch

This commit is contained in:
syuilo 2018-09-13 01:06:18 +09:00
parent 25ec5a24ab
commit aa1817737e
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69

View File

@ -1,15 +1,15 @@
<template> <template>
<span class="mk-avatar" :class="{ cat }" :title="user | acct" v-if="disableLink && !disablePreview" v-user-preview="user.id" @click="onClick"> <span class="mk-avatar" :style="style" :class="{ cat }" :title="user | acct" v-if="disableLink && !disablePreview" v-user-preview="user.id" @click="onClick">
<span class="inner" :style="style"></span> <span class="inner" :style="icon"></span>
</span> </span>
<span class="mk-avatar" :class="{ cat }" :title="user | acct" v-else-if="disableLink && disablePreview" @click="onClick"> <span class="mk-avatar" :style="style" :class="{ cat }" :title="user | acct" v-else-if="disableLink && disablePreview" @click="onClick">
<span class="inner" :style="style"></span> <span class="inner" :style="icon"></span>
</span> </span>
<router-link class="mk-avatar" :class="{ cat }" :to="user | userPage" :title="user | acct" :target="target" v-else-if="!disableLink && !disablePreview" v-user-preview="user.id"> <router-link class="mk-avatar" :style="style" :class="{ cat }" :to="user | userPage" :title="user | acct" :target="target" v-else-if="!disableLink && !disablePreview" v-user-preview="user.id">
<span class="inner" :style="style"></span> <span class="inner" :style="icon"></span>
</router-link> </router-link>
<router-link class="mk-avatar" :class="{ cat }" :to="user | userPage" :title="user | acct" :target="target" v-else-if="!disableLink && disablePreview"> <router-link class="mk-avatar" :style="style" :class="{ cat }" :to="user | userPage" :title="user | acct" :target="target" v-else-if="!disableLink && disablePreview">
<span class="inner" :style="style"></span> <span class="inner" :style="icon"></span>
</router-link> </router-link>
</template> </template>
@ -42,6 +42,11 @@ export default Vue.extend({
return this.user.isCat && this.$store.state.settings.circleIcons; return this.user.isCat && this.$store.state.settings.circleIcons;
}, },
style(): any { style(): any {
return {
borderRadius: this.$store.state.settings.circleIcons ? '100%' : null
};
},
icon(): any {
return { return {
backgroundColor: this.lightmode backgroundColor: this.lightmode
? `rgb(${this.user.avatarColor.slice(0, 3).join(',')})` ? `rgb(${this.user.avatarColor.slice(0, 3).join(',')})`