simplify MkMention
This commit is contained in:
parent
fec0ed7966
commit
5fb82fb0ce
|
@ -1,37 +1,21 @@
|
|||
<template>
|
||||
<MkA
|
||||
v-if="url.startsWith('/')"
|
||||
v-user-preview="canonical"
|
||||
class="akbvjaqn"
|
||||
:class="{ isMe }"
|
||||
:to="url"
|
||||
:style="{ background: bgCss }"
|
||||
@click.stop
|
||||
>
|
||||
<img class="icon" :src="`/avatar/@${username}@${host}`" alt="" />
|
||||
<!-- <img class="icon" :src="`/avatar/@${username}@${host}`" alt="" /> -->
|
||||
<span class="main">
|
||||
<span class="username">@{{ username }}</span>
|
||||
<span
|
||||
<!-- <span
|
||||
v-if="host != localHost || $store.state.showFullAcct"
|
||||
class="host"
|
||||
>@{{ toUnicode(host) }}</span
|
||||
>
|
||||
> -->
|
||||
</span>
|
||||
</MkA>
|
||||
<a
|
||||
v-else
|
||||
class="akbvjaqn"
|
||||
:href="url"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
:style="{ background: bgCss }"
|
||||
@click.stop
|
||||
>
|
||||
<span class="main">
|
||||
<span class="username">@{{ username }}</span>
|
||||
<span class="host">@{{ toUnicode(host) }}</span>
|
||||
</span>
|
||||
</a>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
@ -70,9 +54,9 @@ const bgCss = bg.toRgbString();
|
|||
<style lang="scss" scoped>
|
||||
.akbvjaqn {
|
||||
display: inline-block;
|
||||
padding: 2px 8px 2px 2px;
|
||||
margin-block: 2px;
|
||||
border-radius: 999px;
|
||||
// padding: 2px 8px 2px 2px;
|
||||
// margin-block: 2px;
|
||||
// border-radius: 999px;
|
||||
max-width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
|
|
Loading…
Reference in New Issue