From fc73442cdc4fba8cf7c610bee8a45c76aee8b67b Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Wed, 21 Feb 2018 15:06:10 +0000 Subject: [PATCH 1/2] Change icon from "R" to "X" --- src/components/structures/TagPanel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/TagPanel.js b/src/components/structures/TagPanel.js index d614588ccc..59365d8139 100644 --- a/src/components/structures/TagPanel.js +++ b/src/components/structures/TagPanel.js @@ -111,7 +111,7 @@ const TagPanel = React.createClass({ }); return
- +
Date: Wed, 21 Feb 2018 17:15:43 +0000 Subject: [PATCH 2/2] Only show "X" when filtering, add alt/title --- src/components/structures/TagPanel.js | 17 ++++++++++++++--- src/i18n/strings/en_EN.json | 9 +++++---- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/components/structures/TagPanel.js b/src/components/structures/TagPanel.js index 59365d8139..46e539fa04 100644 --- a/src/components/structures/TagPanel.js +++ b/src/components/structures/TagPanel.js @@ -24,6 +24,7 @@ import GroupActions from '../../actions/GroupActions'; import sdk from '../../index'; import dis from '../../dispatcher'; +import { _t } from '../../languageHandler'; import { Droppable } from 'react-beautiful-dnd'; @@ -92,7 +93,7 @@ const TagPanel = React.createClass({ dis.dispatch({action: 'view_create_group'}); }, - onLogoClick(ev) { + onClearFilterClick(ev) { dis.dispatch({action: 'deselect_tags'}); }, @@ -109,9 +110,19 @@ const TagPanel = React.createClass({ selected={this.state.selectedTags.includes(tag)} />; }); + + const clearButton = this.state.selectedTags.length > 0 ? + {_t("Clear : +
; + return
- - + + { clearButton }
to start a chat with someone": "Press to start a chat with someone", "You're not in any rooms yet! Press to make a room or to browse the directory": "You're not in any rooms yet! Press to make a room or to browse the directory", "Community Invites": "Community Invites", @@ -826,6 +823,7 @@ "Click to mute video": "Click to mute video", "Click to unmute audio": "Click to unmute audio", "Click to mute audio": "Click to mute audio", + "Clear filter": "Clear filter", "Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question.": "Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question.", "Tried to load a specific point in this room's timeline, but was unable to find it.": "Tried to load a specific point in this room's timeline, but was unable to find it.", "Failed to load timeline position": "Failed to load timeline position", @@ -984,5 +982,8 @@ "This process allows you to import encryption keys that you had previously exported from another Matrix client. You will then be able to decrypt any messages that the other client could decrypt.": "This process allows you to import encryption keys that you had previously exported from another Matrix client. You will then be able to decrypt any messages that the other client could decrypt.", "The export file will be protected with a passphrase. You should enter the passphrase here, to decrypt the file.": "The export file will be protected with a passphrase. You should enter the passphrase here, to decrypt the file.", "File to import": "File to import", - "Import": "Import" + "Import": "Import", + "Failed to set direct chat tag": "Failed to set direct chat tag", + "Failed to remove tag %(tagName)s from room": "Failed to remove tag %(tagName)s from room", + "Failed to add tag %(tagName)s to room": "Failed to add tag %(tagName)s to room" }