mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-28 09:51:06 -06:00
ELECTRON-1369 - Set title bar's title once (#721)
This commit is contained in:
parent
1225f50812
commit
92f13bfa61
@ -13,6 +13,7 @@ const TITLE_BAR_NAMESPACE = 'TitleBar';
|
||||
|
||||
export default class WindowsTitleBar extends React.Component<{}, IState> {
|
||||
private readonly window: Electron.BrowserWindow;
|
||||
private readonly title: string;
|
||||
private readonly eventHandlers = {
|
||||
onClose: () => this.close(),
|
||||
onMaximize: () => this.maximize(),
|
||||
@ -24,6 +25,7 @@ export default class WindowsTitleBar extends React.Component<{}, IState> {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.window = remote.getCurrentWindow();
|
||||
this.title = document.title || 'Symphony';
|
||||
this.state = {
|
||||
isFullScreen: this.window.isFullScreen(),
|
||||
isMaximized: this.window.isMaximized(),
|
||||
@ -77,7 +79,7 @@ export default class WindowsTitleBar extends React.Component<{}, IState> {
|
||||
</div>
|
||||
<div className='title-container'>
|
||||
{this.getSymphonyLogo()}
|
||||
<p id='title-bar-title'>{document.title || 'Symphony'}</p>
|
||||
<p id='title-bar-title'>{this.title}</p>
|
||||
</div>
|
||||
<div className='title-bar-button-container'>
|
||||
<button
|
||||
|
Loading…
Reference in New Issue
Block a user