Failed to load the URL
{ 'URL: ' }
{ this.props.errorInfo.validatedURL }
{ 'Error code: ' }
{ this.props.errorInfo.errorCode }
{ this.props.errorInfo.errorDescription }
Please check below.
Is your computer online?
Is the server alive?
Is the URL correct?
);
}
});
var config;
try {
var configFile = remote.getGlobal('config-file');
config = settings.readFileSync(configFile);
} catch (e) {
window.location = 'settings.html';
}
if (config.teams.length === 0) {
window.location = 'settings.html';
}
var contextMenu = require('./menus/context');
var menu = contextMenu.createDefault();
window.addEventListener('contextmenu', function(e) {
menu.popup(remote.getCurrentWindow());
}, false);
var showUnreadBadgeWindows = function(unreadCount, mentionCount) {
const badge = require('./js/badge');
const sendBadge = function(dataURL, description) {
// window.setOverlayIcon() does't work with NativeImage across remote boundaries.
// https://github.com/atom/electron/issues/4011
electron.ipcRenderer.send('win32-overlay', {
overlayDataURL: dataURL,
description: description,
unreadCount: unreadCount,
mentionCount: mentionCount
});
};
if (mentionCount > 0) {
const dataURL = badge.createDataURL(mentionCount.toString());
sendBadge(dataURL, 'You have unread mention (' + mentionCount + ')');
} else if (unreadCount > 0) {
const dataURL = badge.createDataURL('•');
sendBadge(dataURL, 'You have unread channels');
} else {
sendBadge(null, 'You have no unread messages');
}
}
var showUnreadBadgeOSX = function(unreadCount, mentionCount) {
if (mentionCount > 0) {
remote.app.dock.setBadge(mentionCount.toString());
} else if (unreadCount > 0) {
remote.app.dock.setBadge('•');
} else {
remote.app.dock.setBadge('');
}
}
var showUnreadBadge = function(unreadCount, mentionCount) {
switch (process.platform) {
case 'win32':
showUnreadBadgeWindows(unreadCount, mentionCount);
break;
case 'darwin':
showUnreadBadgeOSX(unreadCount, mentionCount);
break;
default:
}
}
ReactDOM.render(