-
+
+ {!board.icon &&
+
+ }
+ {board.showDescription &&
+
+ }
+ {!board.showDescription &&
+
+ }
@@ -66,6 +97,18 @@ class ViewTitle extends React.Component
{
onCancel={() => this.setState({title: this.props.board.title})}
/>
+
+ {board.showDescription &&
+
+ {
+ mutator.changeDescription(board, text)
+ }}
+ />
+
+ }
>
)
}
diff --git a/webapp/src/components/workspaceComponent.scss b/webapp/src/components/workspaceComponent.scss
index 8a1ed13c8..3a46b5c4a 100644
--- a/webapp/src/components/workspaceComponent.scss
+++ b/webapp/src/components/workspaceComponent.scss
@@ -2,5 +2,18 @@
flex: 1 1 auto;
display: flex;
flex-direction: row;
- overflow: auto;
+ overflow: auto;
+
+ > .mainFrame {
+ flex: 1 1 auto;
+ display: flex;
+ flex-direction: column;
+ overflow: auto;
+
+ > .banner {
+ background-color: rgba(230, 220, 192, 0.9);
+ text-align: center;
+ padding: 10px;
+ }
+ }
}
diff --git a/webapp/src/components/workspaceComponent.tsx b/webapp/src/components/workspaceComponent.tsx
index e1bf0f0fa..2f31e23dd 100644
--- a/webapp/src/components/workspaceComponent.tsx
+++ b/webapp/src/components/workspaceComponent.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 {Utils} from '../utils'
import {BoardTree} from '../viewModel/boardTree'
@@ -8,7 +9,7 @@ import {WorkspaceTree} from '../viewModel/workspaceTree'
import BoardComponent from './boardComponent'
import Sidebar from './sidebar'
-import {TableComponent} from './tableComponent'
+import TableComponent from './tableComponent'
import './workspaceComponent.scss'
type Props = {
@@ -34,7 +35,17 @@ class WorkspaceComponent extends React.PureComponent
{
activeBoardId={boardTree?.board.id}
setLanguage={setLanguage}
/>
- {this.mainComponent()}
+
+ {(boardTree?.board.isTemplate) &&
+
+
+
+ }
+ {this.mainComponent()}
+
)
return element
diff --git a/webapp/src/mutator.ts b/webapp/src/mutator.ts
index 8950d90b2..c36f48936 100644
--- a/webapp/src/mutator.ts
+++ b/webapp/src/mutator.ts
@@ -156,6 +156,22 @@ class Mutator {
await this.updateBlock(newBlock, block, description)
}
+ async changeDescription(block: IBlock, boardDescription: string, description = 'change description') {
+ const newBoard = new MutableBoard(block)
+ newBoard.description = boardDescription
+ await this.updateBlock(newBoard, block, description)
+ }
+
+ async showDescription(board: Board, showDescription = true, description?: string) {
+ const newBoard = new MutableBoard(board)
+ newBoard.showDescription = showDescription
+ let actionDescription = description
+ if (!actionDescription) {
+ actionDescription = showDescription ? 'show description' : 'hide description'
+ }
+ await this.updateBlock(newBoard, board, actionDescription)
+ }
+
async changeOrder(block: IOrderedBlock, order: number, description = 'change order') {
const newBlock = new MutableOrderedBlock(block)
newBlock.order = order
@@ -484,42 +500,69 @@ class Mutator {
// Duplicate
- async duplicateCard(cardId: string, description = 'duplicate card', afterRedo?: (newBoardId: string) => Promise