mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-13 04:28:41 -09:00
* Step 1: move electorn into `app/`. This is to comply with the suggested directory format of `electron-builder`: https://github.com/electron-userland/electron-builder#two-packagejson-structure * Step 2: add build directory with icon files for mac / windows * Step 3: move all development (web) assets into main directory * Step 4: add `build` namespace to dev `package.json` * Step 5: move all dev dependencies into dev file and get rid of old electron packagers in favor of `eletorn-builder` * Step 6: target build inside `app/` as everything else is excluded at build time * Step 7: remove old stuff! * Step 8: update README * turn off asar for `child_pty`
75 lines
2.1 KiB
JavaScript
75 lines
2.1 KiB
JavaScript
import React from 'react';
|
|
import Component from '../component';
|
|
import Notification_ from './notification';
|
|
import { decorate } from '../utils/plugins';
|
|
|
|
const Notification = decorate(Notification_);
|
|
|
|
export default class Notifications extends Component {
|
|
|
|
template (css) {
|
|
return <div className={ css('view') }>
|
|
{ this.props.customChildrenBefore }
|
|
{
|
|
this.props.fontShowing &&
|
|
<Notification
|
|
key='font'
|
|
backgroundColor='rgba(255, 255, 255, .2)'
|
|
text={`${this.props.fontSize}px`}
|
|
userDismissable={ false }
|
|
onDismiss={ this.props.onDismissFont }
|
|
dismissAfter={ 1000 } />
|
|
}
|
|
|
|
{
|
|
this.props.resizeShowing &&
|
|
<Notification
|
|
key='resize'
|
|
backgroundColor='rgba(255, 255, 255, .2)'
|
|
text={`${this.props.cols}x${this.props.rows}`}
|
|
userDismissable={ false }
|
|
onDismiss={ this.props.onDismissResize }
|
|
dismissAfter={ 1000 } />
|
|
}
|
|
|
|
{
|
|
this.props.updateShowing &&
|
|
<Notification
|
|
key='update'
|
|
backgroundColor='#7ED321'
|
|
text={`Version ${this.props.updateVersion} ready`}
|
|
onDismiss={ this.props.onDismissUpdate }
|
|
userDismissable={ true }>
|
|
Version <b>{ this.props.updateVersion}</b> ready.
|
|
{ this.props.updateNote && ` ${this.props.updateNote.trim().replace(/\.$/, '')}` }
|
|
{ ' ' }
|
|
(<a
|
|
style={{ color: '#fff' }}
|
|
target="_blank"
|
|
href={`https://github.com/zeit/hyperterm/releases/tag/${this.props.updateVersion}`}>notes</a>).
|
|
{ ' ' }
|
|
<a style={{
|
|
cursor: 'pointer',
|
|
textDecoration: 'underline',
|
|
fontWeight: 'bold' }}
|
|
onClick={ this.props.onUpdateInstall }>
|
|
Restart
|
|
</a>.
|
|
{ ' ' }
|
|
</Notification>
|
|
}
|
|
{ this.props.customChildren }
|
|
</div>;
|
|
}
|
|
|
|
styles () {
|
|
return {
|
|
view: {
|
|
position: 'fixed',
|
|
bottom: '20px',
|
|
right: '20px'
|
|
}
|
|
};
|
|
}
|
|
|
|
}
|