summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-02-11 08:49:50 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-02-11 08:49:50 +0900
commitbe113e1c72a32145cc15cde37f6ec9447dc4496d (patch)
treef7e56b63a364f7895bbe0d1af107623c35f7e347 /src
parentMerge pull request #149 from syuilo/greenkeeper/@types/mongodb-2.1.40 (diff)
downloadsharkey-be113e1c72a32145cc15cde37f6ec9447dc4496d.tar.gz
sharkey-be113e1c72a32145cc15cde37f6ec9447dc4496d.tar.bz2
sharkey-be113e1c72a32145cc15cde37f6ec9447dc4496d.zip
#150
Diffstat (limited to 'src')
-rw-r--r--src/web/app/common/scripts/text-compiler.js2
-rw-r--r--src/web/app/desktop/tags/timeline-post.tag8
-rw-r--r--src/web/app/mobile/tags/timeline-post.tag8
3 files changed, 17 insertions, 1 deletions
diff --git a/src/web/app/common/scripts/text-compiler.js b/src/web/app/common/scripts/text-compiler.js
index 29b700e628..25f36382fb 100644
--- a/src/web/app/common/scripts/text-compiler.js
+++ b/src/web/app/common/scripts/text-compiler.js
@@ -27,7 +27,7 @@ module.exports = function(tokens, shouldBreak, shouldEscape) {
case 'link':
return '<mk-url href="' + escape(token.content) + '" target="_blank"></mk-url>';
case 'mention':
- return '<a href="' + CONFIG.url + '/' + escape(token.username) + '" target="_blank" data-user-preview="' + token.content + '">' + token.content + '</a>';
+ return '<a href="' + CONFIG.url + '/' + escape(token.username) + '" target="_blank" data-user-preview="' + token.content + '" ' + (me && me.username == token.username ? 'data-is-me' : '') + '>' + token.content + '</a>';
case 'hashtag': // TODO
return '<a>' + escape(token.content) + '</a>';
case 'code':
diff --git a/src/web/app/desktop/tags/timeline-post.tag b/src/web/app/desktop/tags/timeline-post.tag
index 1dfaf0d58c..6d0f5ca830 100644
--- a/src/web/app/desktop/tags/timeline-post.tag
+++ b/src/web/app/desktop/tags/timeline-post.tag
@@ -239,6 +239,14 @@
background #f8f8f8
border-radius 2px
+ [data-is-me]:after
+ content "you"
+ padding 0 4px
+ margin-left 4px
+ font-size 80%
+ color $theme-color-foreground
+ background $theme-color
+
> .media
> img
display block
diff --git a/src/web/app/mobile/tags/timeline-post.tag b/src/web/app/mobile/tags/timeline-post.tag
index 72e56423d3..d2313d0180 100644
--- a/src/web/app/mobile/tags/timeline-post.tag
+++ b/src/web/app/mobile/tags/timeline-post.tag
@@ -219,6 +219,14 @@
background #f8f8f8
border-radius 2px
+ [data-is-me]:after
+ content "you"
+ padding 0 4px
+ margin-left 4px
+ font-size 80%
+ color $theme-color-foreground
+ background $theme-color
+
> .media
> img
display block