import React from 'react'; import {PureComponent} from '../base-components'; import {decorate} from '../utils/plugins'; import Notification_ from './notification'; const Notification = decorate(Notification_, 'Notification'); export default class Notifications extends PureComponent { template(css) { return (
{this.props.customChildrenBefore} {this.props.fontShowing && ( )} {this.props.resizeShowing && ( )} {this.props.messageShowing && ( {this.props.messageURL ? [ this.props.messageText, ' (', { window.require('electron').shell.openExternal(ev.target.href); ev.preventDefault(); }} href={this.props.messageURL} > more , ')' ] : null} )} {this.props.updateShowing && ( Version {this.props.updateVersion} ready. {this.props.updateNote && ` ${this.props.updateNote.trim().replace(/\.$/, '')}`} ( { window.require('electron').shell.openExternal(ev.target.href); ev.preventDefault(); }} href={this.props.updateReleaseUrl} > notes ).{' '} {this.props.updateCanInstall ? ( Restart ) : ( { window.require('electron').shell.openExternal(ev.target.href); ev.preventDefault(); }} href={this.props.updateReleaseUrl} > Download )}.{' '} )} {this.props.customChildren}
); } styles() { return { view: { position: 'fixed', bottom: '20px', right: '20px' } }; } }