import React, {forwardRef} from 'react'; import type {NotificationsProps} from '../../typings/hyper'; import {decorate} from '../utils/plugins'; import Notification_ from './notification'; const Notification = decorate(Notification_, 'Notification'); const Notifications = forwardRef((props, ref) => { return (
{props.customChildrenBefore} {props.fontShowing && ( )} {props.resizeShowing && ( )} {props.messageShowing && ( {props.messageURL ? ( <> {props.messageText} ( { void window.require('electron').shell.openExternal(ev.currentTarget.href); ev.preventDefault(); }} href={props.messageURL} > more ) ) : null} )} {props.updateShowing && ( Version {props.updateVersion} ready. {props.updateNote && ` ${props.updateNote.trim().replace(/\.$/, '')}`} ( { void window.require('electron').shell.openExternal(ev.currentTarget.href); ev.preventDefault(); }} href={`https://github.com/quine-global/hyper/releases/tag/${props.updateVersion}`} > notes ).{' '} {props.updateCanInstall ? ( Restart ) : ( { void window.require('electron').shell.openExternal(ev.currentTarget.href); ev.preventDefault(); }} href={props.updateReleaseUrl!} > Download )} .{' '} )} {props.customChildren}
); }); Notifications.displayName = 'Notifications'; export default Notifications;