import React from 'react'; import {decorate} from '../utils/plugins'; import Notification_ from './notification'; import {NotificationsProps} from '../hyper'; const Notification = decorate(Notification_, 'Notification'); export default class Notifications extends React.PureComponent { render() { 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.currentTarget.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.currentTarget.href); ev.preventDefault(); }} href={`https://github.com/vercel/hyper/releases/tag/${this.props.updateVersion}`} > notes ).{' '} {this.props.updateCanInstall ? ( Restart ) : ( { window.require('electron').shell.openExternal(ev.currentTarget.href); ev.preventDefault(); }} href={this.props.updateReleaseUrl!} > Download )} .{' '} )} {this.props.customChildren}
); } }