From 22c8f71945c6d114bf4db89c87eb1b166775f2d6 Mon Sep 17 00:00:00 2001
From: Henry Jameson <me@hjkos.com>
Date: Mon, 7 Jun 2021 16:16:10 +0300
Subject: mention link

---
 src/components/mention_link/mention_link.vue | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 src/components/mention_link/mention_link.vue

(limited to 'src/components/mention_link/mention_link.vue')

diff --git a/src/components/mention_link/mention_link.vue b/src/components/mention_link/mention_link.vue
new file mode 100644
index 00000000..84ed3205
--- /dev/null
+++ b/src/components/mention_link/mention_link.vue
@@ -0,0 +1,17 @@
+<template>
+  <span class="MentionLink">
+    <a v-if="!user" v-html="content" href="url" class="original"/>
+    <span v-if="user" class="new" :style="style" :class="{ '-you': isYou }" >
+      <button class="button-unstyled short" @click.prevent="onClick">
+        <span class="shortName">@<span v-html="userName" /></span> <span v-if="isYou">(You)</span>
+      </button>
+      <span class="full" v-if="userName !== userNameFull">
+        @<span v-html="userNameFull" />
+      </span>
+    </span>
+  </span>
+</template>
+
+<script src="./mention_link.js"/>
+
+<style lang="scss" src="./mention_link.scss"/>
-- 
cgit v1.2.3-70-g09d2

