Skip to content

Commit

Permalink
fix: Fixes Cards template (#2752)
Browse files Browse the repository at this point in the history
* Fixes Cards template

* Update Composer/packages/client/src/components/Header/index.jsx

Co-Authored-By: Andy Brown <asbrown002@gmail.com>

* Adds Fragment

Co-authored-by: Andy Brown <asbrown002@gmail.com>
  • Loading branch information
cwhitten and a-b-r-o-w-n authored Apr 23, 2020
1 parent 3d94f1c commit 0574466
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Composer/packages/client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export const App: React.FC = () => {
>
{announcement}
</div>
<Header botName={`${botName}(${locale})`} />
<Header botName={botName} locale={locale} />
<div css={main}>
<nav css={sideBar(sideBarExpand)}>
<div>
Expand Down
10 changes: 7 additions & 3 deletions Composer/packages/client/src/components/Header/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { jsx } from '@emotion/core';
import formatMessage from 'format-message';
import { IconButton } from 'office-ui-fabric-react/lib/Button';
import { useContext, useCallback } from 'react';
import { useContext, useCallback, Fragment } from 'react';

import composerIcon from '../../images/composerIcon.svg';
import { AppUpdaterStatus } from '../../constants';
Expand Down Expand Up @@ -35,8 +35,12 @@ export const Header = props => {
src={composerIcon}
/>
<div css={title}>{formatMessage('Bot Framework Composer')}</div>
<div css={divider} />
<div css={botName}>{props.botName}</div>
{props.botName && (
<Fragment>
<div css={divider} />
<span css={botName}>{`${props.botName} (${props.locale})`}</span>
</Fragment>
)}
{showUpdateAvailableIcon && (
<IconButton
iconProps={{ iconName: 'History' }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,10 @@

# AllCards
[Activity
Attachments = ${HeroCard()} | ${ThumbnailCard()} | ${SigninCard()} | ${AnimationCard()} | ${VideoCard()} | ${AudioCard()} | ${AdaptiveCard()}
Attachments = ${HeroCard()} | ${ThumbnailCard()} | ${SigninCard()} | ${AnimationCard()} | ${VideoCard()} | ${AudioCard()} | ${json(adaptivecardjson())}
AttachmentLayout = ${AttachmentLayoutType()}
]


# help
- ```
I can show you examples on different Cards
Expand Down
5 changes: 2 additions & 3 deletions Composer/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3370,7 +3370,6 @@

"@microsoft/bf-lu@4.9.0-preview.121555":
version "4.9.0-preview.121555"
uid "3c9e4959c03117e1fea8360f78ae83022cb4751e"
resolved "https://botbuilder.myget.org/F/botframework-cli/npm/@microsoft/bf-lu/-/@microsoft/bf-lu-4.9.0-preview.121555#3c9e4959c03117e1fea8360f78ae83022cb4751e"
dependencies:
"@azure/cognitiveservices-luis-authoring" "4.0.0-preview.1"
Expand Down Expand Up @@ -5157,7 +5156,7 @@ arg@^4.1.0:
resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.1.tgz#485f8e7c390ce4c5f78257dbea80d4be11feda4c"
integrity sha512-SlmP3fEA88MBv0PypnXZ8ZfJhwmDeIE3SP71j37AiXQBXYosPV0x6uISAaHYSlSVhmHOVkomen0tbGk6Anlebw==

argparse@^1.0.7, argparse@~1.0.10:
argparse@^1.0.7, argparse@^1.0.9, argparse@~1.0.10:
version "1.0.10"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==
Expand Down Expand Up @@ -13737,7 +13736,7 @@ natural-orderby@^2.0.1:
version "2.0.3"
resolved "https://registry.yarnpkg.com/natural-orderby/-/natural-orderby-2.0.3.tgz#8623bc518ba162f8ff1cdb8941d74deb0fdcc016"
integrity sha512-p7KTHxU0CUrcOXe62Zfrb5Z13nLvPhSWR/so3kFulUQU0sgUll2Z0LwpsLN351eOOD+hRGu/F1g+6xDfPeD++Q==

ncp@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3"
Expand Down

0 comments on commit 0574466

Please sign in to comment.