diff --git a/webapp/i18n/en.json b/webapp/i18n/en.json index 9b73f60fc..7bfca990c 100644 --- a/webapp/i18n/en.json +++ b/webapp/i18n/en.json @@ -7,5 +7,17 @@ "Sidebar.set-spanish-language": "Set Spanish Language", "Sidebar.settings": "Settings", "Sidebar.untitled-board": "(Untitled Board)", - "Sidebar.untitled-view": "(Untitled View)" + "Sidebar.untitled-view": "(Untitled View)", + "TableComponent.add-icon": "Add Icon", + "TableComponent.filter": "Filter", + "TableComponent.loading": "Loading...", + "TableComponent.name": "Name", + "TableComponent.new": "New", + "TableComponent.plus-new": "+ New", + "TableComponent.properties": "Properties", + "TableComponent.random-icon": "Random", + "TableComponent.remove-icon": "Remove Icon", + "TableComponent.search": "Search", + "TableComponent.search-text": "Search text", + "TableComponent.sort": "Sort" } \ No newline at end of file diff --git a/webapp/i18n/es.json b/webapp/i18n/es.json index 24123e3c9..a952cfe7b 100644 --- a/webapp/i18n/es.json +++ b/webapp/i18n/es.json @@ -7,5 +7,17 @@ "Sidebar.set-spanish-language": "Usar idioma Español", "Sidebar.settings": "Configuración", "Sidebar.untitled-board": "(Panel sin titulo)", - "Sidebar.untitled-view": "(Vista sin titulo)" + "Sidebar.untitled-view": "(Vista sin titulo)", + "TableComponent.add-icon": "Añadir Icono", + "TableComponent.filter": "Filtrar", + "TableComponent.loading": "Cargando...", + "TableComponent.name": "Nombre", + "TableComponent.new": "Nueva", + "TableComponent.plus-new": "+ Nueva", + "TableComponent.properties": "Propiedades", + "TableComponent.random-icon": "Aleatorio", + "TableComponent.remove-icon": "Quitar Icono", + "TableComponent.search": "Buscar", + "TableComponent.search-text": "Texto de búsqueda", + "TableComponent.sort": "Ordenar" } diff --git a/webapp/src/components/tableComponent.tsx b/webapp/src/components/tableComponent.tsx index 6ba4c0655..77ad5dad6 100644 --- a/webapp/src/components/tableComponent.tsx +++ b/webapp/src/components/tableComponent.tsx @@ -1,6 +1,7 @@ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. import React from 'react' +import {FormattedMessage} from 'react-intl' import {Archiver} from '../archiver' import {BlockIcons} from '../blockIcons' @@ -62,7 +63,12 @@ class TableComponent extends React.Component { if (!boardTree || !boardTree.board) { return ( -
Loading...
+
+ +
) } @@ -99,35 +105,60 @@ class TableComponent extends React.Component { const newIcon = BlockIcons.shared.randomIcon() mutator.changeIcon(board, newIcon) }} - >Add Icon + > + +
- {board.icon ? + {board.icon &&
{board.icon}
- mutator.changeIcon(board, BlockIcons.shared.randomIcon())} - /> - mutator.changeIcon(board, undefined, 'remove icon')} - /> + + {(text: string) => ( + mutator.changeIcon(board, BlockIcons.shared.randomIcon())} + /> + )} + + + {(text: string) => ( + mutator.changeIcon(board, undefined, 'remove icon')} + /> + )} + -
: - undefined} - { - mutator.changeTitle(board, text) - }} - /> + } + + {(placeholder: string) => ( + { + mutator.changeTitle(board, text) + }} + /> + )} +
@@ -159,39 +190,66 @@ class TableComponent extends React.Component { onClick={(e) => { this.propertiesClicked(e) }} - >Properties
+ > + +
{ this.filterClicked(e) }} - >Filter
+ > + +
{ OctoUtils.showSortMenu(e, boardTree) }} - >Sort
- {this.state.isSearching ? - { - this.searchChanged(text) - }} - onKeyDown={(e) => { - this.onSearchKeyDown(e) - }} - /> : + > + + + {this.state.isSearching && + + {(placeholder: string) => ( + { + this.searchChanged(text) + }} + onKeyDown={(e) => { + this.onSearchKeyDown(e) + }} + /> + )} + } + {!this.state.isSearching &&
{ this.setState({...this.state, isSearching: true}) }} - >Search
- } + > + + }
this.optionsClicked(e)} @@ -201,7 +259,12 @@ class TableComponent extends React.Component { onClick={() => { this.addCard(true) }} - >New
+ > + + {/* Main content */} @@ -224,7 +287,12 @@ class TableComponent extends React.Component { onClick={(e) => { this.headerClicked(e, '__name') }} - >Name + > + + {board.cardProperties. @@ -308,7 +376,10 @@ class TableComponent extends React.Component { this.addCard() }} > - + New +