Skip to content

Commit 6d482fd

Browse files
committed
Allow customized logo
Show alternate logo if GUI is initialized with a different file.
1 parent 48c5069 commit 6d482fd

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/components/gui/gui.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ const GUIComponent = props => {
8787
isRtl,
8888
isShared,
8989
loading,
90+
logo,
9091
renderLogin,
9192
onClickAccountNav,
9293
onCloseAccountNav,
@@ -215,6 +216,7 @@ const GUIComponent = props => {
215216
className={styles.menuBarPosition}
216217
enableCommunity={enableCommunity}
217218
isShared={isShared}
219+
logo={logo}
218220
renderLogin={renderLogin}
219221
showComingSoon={showComingSoon}
220222
onClickAccountNav={onClickAccountNav}
@@ -384,6 +386,7 @@ GUIComponent.propTypes = {
384386
isRtl: PropTypes.bool,
385387
isShared: PropTypes.bool,
386388
loading: PropTypes.bool,
389+
logo: PropTypes.string,
387390
onActivateCostumesTab: PropTypes.func,
388391
onActivateSoundsTab: PropTypes.func,
389392
onActivateTab: PropTypes.func,

src/components/menu-bar/menu-bar.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ class MenuBar extends React.Component {
327327
[styles.clickable]: typeof this.props.onClickLogo !== 'undefined'
328328
})}
329329
draggable={false}
330-
src={scratchLogo}
330+
src={this.props.logo ? this.props.logo : scratchLogo}
331331
onClick={this.props.onClickLogo}
332332
/>
333333
</div>
@@ -723,6 +723,7 @@ MenuBar.propTypes = {
723723
languageMenuOpen: PropTypes.bool,
724724
locale: PropTypes.string.isRequired,
725725
loginMenuOpen: PropTypes.bool,
726+
logo: PropTypes.string,
726727
onClickAccount: PropTypes.func,
727728
onClickEdit: PropTypes.func,
728729
onClickFile: PropTypes.func,

0 commit comments

Comments
 (0)