Change window title to the one that's set from the platform for the current channel
This commit is contained in:
@@ -9,6 +9,7 @@ Release date: TBD
|
||||
### Improvements
|
||||
|
||||
#### All platforms
|
||||
- Show current channel/team in window title
|
||||
- Changed display of unread messages on the team tabbar, they are now shown as bold text
|
||||
- Reload only the selected tab and keep its URL on "Reload" and "Clear Cache and Reload".
|
||||
- Disabled `eval()` function for security improvements.
|
||||
|
@@ -3,7 +3,6 @@
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Mattermost</title>
|
||||
<link rel="stylesheet" href="modules/bootstrap/css/bootstrap.min.css">
|
||||
</head>
|
||||
|
||||
|
@@ -94,6 +94,11 @@ var MainPage = React.createClass({
|
||||
key: newKey
|
||||
});
|
||||
this.handleOnTeamFocused(key);
|
||||
|
||||
var webview = document.getElementById('mattermostView' + key);
|
||||
ipcRenderer.send('update-title', {
|
||||
title: webview.getTitle()
|
||||
});
|
||||
},
|
||||
handleUnreadCountChange: function(index, unreadCount, mentionCount, isUnread, isMentioned) {
|
||||
var unreadCounts = this.state.unreadCounts;
|
||||
@@ -403,6 +408,12 @@ var MattermostView = React.createClass({
|
||||
}
|
||||
});
|
||||
|
||||
webview.addEventListener('page-title-updated', function(event) {
|
||||
ipcRenderer.send('update-title', {
|
||||
title: event.title
|
||||
});
|
||||
});
|
||||
|
||||
webview.addEventListener('console-message', (e) => {
|
||||
const message = `[${this.props.name}] ${e.message}`;
|
||||
switch (e.level) {
|
||||
|
@@ -229,6 +229,11 @@ app.on('ready', function() {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
ipcMain.on('update-title', function(event, arg) {
|
||||
mainWindow.setTitle(arg.title);
|
||||
});
|
||||
|
||||
if (shouldShowTrayIcon()) {
|
||||
// set up tray icon
|
||||
trayIcon = new Tray(trayImages.normal);
|
||||
|
Reference in New Issue
Block a user