Skip to content

Commit ae72abb

Browse files
committed
feat: implement links to boards and user profile from post search
1 parent be2a008 commit ae72abb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/views/PostSearch.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,12 @@
3737
<h5>
3838
<router-link :title="decode(post.thread_title)" :to="{ name: 'Posts', params: { threadSlug: post.thread_slug, threadId: post.thread_id }, query: { start: post.position }, hash: `#${post.id}` }" v-html="decode(post.thread_title)"></router-link>
3939
</h5>
40+
<!--TODO(akinsey): post.user.online does not exist -->
4041
<span v-if="post.user.online" :data-balloon="post.user.username + ' is online'" class="online green"><i class="fas fa-circle"></i></span>
4142
<span v-if="!post.user.online" class="online green"><i class="far fa-circle"></i></span>
42-
<a class="username" :data-balloon="post.user.role_name || 'User'" href="#" :style="usernameHighlight(post.user.highlight_color)" v-html="post.user.username"></a>
43+
<router-link :to="{ path: '/profile/' + post.user.username.toLowerCase() }" class="username" v-html="post.user.username" />
4344
<div class="posted-in">posted in</div>
44-
<a class="board-name" href="#" v-html="post.board_name"></a>
45+
<router-link class="board-name" :to="{ name: 'Threads', params: { boardSlug: post.board_slug, boardId: post.board_id } }" v-html="post.board_name" />
4546
<div class="timestamp">{{ humanDate(post.created_at) }}</div>
4647
<div class="clear"></div>
4748
</div>

0 commit comments

Comments
 (0)