Fix #2133 など
This commit is contained in:
parent
01d3f5f09d
commit
454d294cf3
|
@ -1,6 +1,8 @@
|
|||
<template>
|
||||
<router-link class="mk-avatar" :to="user | userPage" :title="user | acct" :target="target" :style="style" v-if="disablePreview"></router-link>
|
||||
<router-link class="mk-avatar" :to="user | userPage" :title="user | acct" :target="target" :style="style" v-else v-user-preview="user.id"></router-link>
|
||||
<span class="mk-avatar" :title="user | acct" :style="style" v-if="disableLink && !disablePreview" v-user-preview="user.id" @click="onClick"></span>
|
||||
<span class="mk-avatar" :title="user | acct" :style="style" v-else-if="disableLink && disablePreview" @click="onClick"></span>
|
||||
<router-link class="mk-avatar" :to="user | userPage" :title="user | acct" :target="target" :style="style" v-else-if="!disableLink && !disablePreview" v-user-preview="user.id"></router-link>
|
||||
<router-link class="mk-avatar" :to="user | userPage" :title="user | acct" :target="target" :style="style" v-else-if="!disableLink && disablePreview"></router-link>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -15,6 +17,10 @@ export default Vue.extend({
|
|||
required: false,
|
||||
default: null
|
||||
},
|
||||
disableLink: {
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
disablePreview: {
|
||||
required: false,
|
||||
default: false
|
||||
|
@ -35,6 +41,11 @@ export default Vue.extend({
|
|||
borderRadius: this.$store.state.settings.circleIcons ? '100%' : null
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClick(e) {
|
||||
this.$emit('click', e);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -6,10 +6,11 @@
|
|||
<div class="banner"
|
||||
:style="$store.state.i.bannerUrl ? `background-image: url(${$store.state.i.bannerUrl})` : ''"
|
||||
title="%i18n:@update-banner%"
|
||||
@click="os.apis.updateBanner"
|
||||
@click="() => os.apis.updateBanner()"
|
||||
></div>
|
||||
<mk-avatar class="avatar" :user="$store.state.i"
|
||||
@click="os.apis.updateAvatar"
|
||||
:disable-link="true"
|
||||
@click="() => os.apis.updateAvatar()"
|
||||
title="%i18n:@update-avatar%"
|
||||
/>
|
||||
<router-link class="name" :to="$store.state.i | userPage">{{ $store.state.i | userName }}</router-link>
|
||||
|
|
Loading…
Reference in New Issue