diff options
| author | HJ <30-hj@users.noreply.git.pleroma.social> | 2021-09-07 16:15:41 +0000 |
|---|---|---|
| committer | HJ <30-hj@users.noreply.git.pleroma.social> | 2021-09-07 16:15:41 +0000 |
| commit | 8af1f08539d7c2863107bd3dfd36002b7558e252 (patch) | |
| tree | a50006d11cdf6b834b49c2c98dc192609ba4471a /src/components/mention_link/mention_link.vue | |
| parent | 25a8b48bf28e1a0e0765f28221c5528f5854656b (diff) | |
| parent | 4d73eaa6cef7a8b81bcca719755b11c05717d395 (diff) | |
Merge branch 'better-still-emoji' into 'develop'
Status HTML parsing - better emoji and mentions rendering
Closes #935
See merge request pleroma/pleroma-fe!1392
Diffstat (limited to 'src/components/mention_link/mention_link.vue')
| -rw-r--r-- | src/components/mention_link/mention_link.vue | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/components/mention_link/mention_link.vue b/src/components/mention_link/mention_link.vue new file mode 100644 index 00000000..a22b486c --- /dev/null +++ b/src/components/mention_link/mention_link.vue @@ -0,0 +1,56 @@ +<template> + <span + class="MentionLink" + > + <!-- eslint-disable vue/no-v-html --> + <a + v-if="!user" + :href="url" + class="original" + target="_blank" + v-html="content" + /> + <!-- eslint-enable vue/no-v-html --> + <span + v-if="user" + class="new" + :style="style" + :class="classnames" + > + <a + class="short button-unstyled" + :href="url" + @click.prevent="onClick" + > + <!-- eslint-disable vue/no-v-html --> + <FAIcon + size="sm" + icon="at" + class="at" + /><span class="shortName"><span + class="userName" + v-html="userName" + /></span> + <span + v-if="isYou" + class="you" + >{{ $t('status.you') }}</span> + <!-- eslint-enable vue/no-v-html --> + </a> + <span + v-if="userName !== userNameFull" + class="full popover-default" + :class="[highlightType]" + > + <span + class="userNameFull" + v-text="'@' + userNameFull" + /> + </span> + </span> + </span> +</template> + +<script src="./mention_link.js"/> + +<style lang="scss" src="./mention_link.scss"/> |
