simplify MkMention

This commit is contained in:
ThatOneCalculator 2023-04-12 14:18:37 -07:00
parent fec0ed7966
commit 5fb82fb0ce
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
1 changed files with 6 additions and 22 deletions

View File

@ -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;