From 0ce63d6ffa3dcfa545a8ef8db40a5a12cf5674ca Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 3 Mar 2020 19:14:36 -0500 Subject: [PATCH] Adding icon-plus and minus-square. --- ui/src/components/comment-node.tsx | 10 +++++++++- ui/src/components/post-listing.tsx | 8 ++++++-- ui/src/components/symbols.tsx | 6 ++++++ ui/src/utils.ts | 10 +++++----- 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/ui/src/components/comment-node.tsx b/ui/src/components/comment-node.tsx index 340ef1090..d548e9b21 100644 --- a/ui/src/components/comment-node.tsx +++ b/ui/src/components/comment-node.tsx @@ -242,7 +242,15 @@ export class CommentNode extends Component { className="unselectable pointer text-monospace" onClick={linkEvent(this, this.handleCommentCollapse)} > - {this.state.collapsed ? '[+]' : '[-]'} + {this.state.collapsed ? ( + + + + ) : ( + + + + )} diff --git a/ui/src/components/post-listing.tsx b/ui/src/components/post-listing.tsx index 97d319d81..193c2a549 100644 --- a/ui/src/components/post-listing.tsx +++ b/ui/src/components/post-listing.tsx @@ -353,7 +353,9 @@ export class PostListing extends Component { data-tippy-content={i18n.t('expand_here')} onClick={linkEvent(this, this.handleImageExpandClick)} > - [+] + + + ) : ( @@ -361,7 +363,9 @@ export class PostListing extends Component { class="text-monospace unselectable pointer ml-2 text-muted small" onClick={linkEvent(this, this.handleImageExpandClick)} > - [-] + + +
{ xmlnsXlink="http://www.w3.org/1999/xlink" > + + + + + + diff --git a/ui/src/utils.ts b/ui/src/utils.ts index 0376d3ce0..d531a7ca9 100644 --- a/ui/src/utils.ts +++ b/ui/src/utils.ts @@ -34,7 +34,7 @@ import { } from './interfaces'; import { UserService, WebSocketService } from './services'; -import Tribute from 'tributejs'; +import Tribute from 'tributejs/src/Tribute.js'; import markdown_it from 'markdown-it'; import markdownitEmoji from 'markdown-it-emoji/light'; import markdown_it_container from 'markdown-it-container'; @@ -427,7 +427,7 @@ export function toast(text: string, background: string = 'success') { }).showToast(); } -export function setupTribute(): any { +export function setupTribute(): Tribute { return new Tribute({ collection: [ // Emojis @@ -445,7 +445,7 @@ export function setupTribute(): any { }), allowSpaces: false, autocompleteMode: true, - // menuItemLimit: mentionDropdownFetchLimit, + menuItemLimit: mentionDropdownFetchLimit, menuShowMinLength: 3, }, // Users @@ -459,7 +459,7 @@ export function setupTribute(): any { }, allowSpaces: false, autocompleteMode: true, - // menuItemLimit: mentionDropdownFetchLimit, + menuItemLimit: mentionDropdownFetchLimit, menuShowMinLength: 3, }, @@ -474,7 +474,7 @@ export function setupTribute(): any { }, allowSpaces: false, autocompleteMode: true, - // menuItemLimit: mentionDropdownFetchLimit, + menuItemLimit: mentionDropdownFetchLimit, menuShowMinLength: 3, }, ],