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> <template>
<MkA <MkA
v-if="url.startsWith('/')"
v-user-preview="canonical" v-user-preview="canonical"
class="akbvjaqn" class="akbvjaqn"
:class="{ isMe }" :class="{ isMe }"
:to="url" :to="url"
:style="{ background: bgCss }"
@click.stop @click.stop
> >
<img class="icon" :src="`/avatar/@${username}@${host}`" alt="" /> <!-- <img class="icon" :src="`/avatar/@${username}@${host}`" alt="" /> -->
<span class="main"> <span class="main">
<span class="username">@{{ username }}</span> <span class="username">@{{ username }}</span>
<span <!-- <span
v-if="host != localHost || $store.state.showFullAcct" v-if="host != localHost || $store.state.showFullAcct"
class="host" class="host"
>@{{ toUnicode(host) }}</span >@{{ toUnicode(host) }}</span
> > -->
</span> </span>
</MkA> </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> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -70,9 +54,9 @@ const bgCss = bg.toRgbString();
<style lang="scss" scoped> <style lang="scss" scoped>
.akbvjaqn { .akbvjaqn {
display: inline-block; display: inline-block;
padding: 2px 8px 2px 2px; // padding: 2px 8px 2px 2px;
margin-block: 2px; // margin-block: 2px;
border-radius: 999px; // border-radius: 999px;
max-width: 100%; max-width: 100%;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;