1
0
mirror of https://github.com/mattermost/focalboard.git synced 2025-01-02 14:47:55 +02:00

Hide "select a template" label if no templates

This commit is contained in:
Chen-I Lim 2020-12-10 09:32:10 -08:00
parent 2574027f9c
commit 40902c1803
2 changed files with 22 additions and 18 deletions

View File

@ -193,6 +193,7 @@ class Sidebar extends React.Component<Props, State> {
/>
</Button>
<Menu position='top'>
{workspaceTree.boardTemplates.length > 0 && <>
<Menu.Label>
<b>
<FormattedMessage
@ -203,6 +204,7 @@ class Sidebar extends React.Component<Props, State> {
</Menu.Label>
<Menu.Separator/>
</>}
{workspaceTree.boardTemplates.map((boardTemplate) => {
let displayName = boardTemplate.title || intl.formatMessage({id: 'Sidebar.untitled', defaultMessage: 'Untitled'})

View File

@ -388,6 +388,7 @@ class ViewHeader extends React.Component<Props, State> {
)}
>
<Menu position='left'>
{boardTree.cardTemplates.length > 0 && <>
<Menu.Label>
<b>
<FormattedMessage
@ -398,6 +399,7 @@ class ViewHeader extends React.Component<Props, State> {
</Menu.Label>
<Menu.Separator/>
</>}
{boardTree.cardTemplates.map((cardTemplate) => {
let displayName = cardTemplate.title || intl.formatMessage({id: 'ViewHeader.untitled', defaultMessage: 'Untitled'})