mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-15 05:08:41 -09:00
port notifications component to ts
This commit is contained in:
parent
b26a6e5443
commit
4a3132b8e7
1 changed files with 6 additions and 5 deletions
|
|
@ -3,10 +3,11 @@ import React from 'react';
|
||||||
import {decorate} from '../utils/plugins';
|
import {decorate} from '../utils/plugins';
|
||||||
|
|
||||||
import Notification_ from './notification';
|
import Notification_ from './notification';
|
||||||
|
import {NotificationsProps} from '../hyper';
|
||||||
|
|
||||||
const Notification = decorate(Notification_, 'Notification');
|
const Notification = decorate(Notification_, 'Notification');
|
||||||
|
|
||||||
export default class Notifications extends React.PureComponent {
|
export default class Notifications extends React.PureComponent<NotificationsProps> {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="notifications_view">
|
<div className="notifications_view">
|
||||||
|
|
@ -50,7 +51,7 @@ export default class Notifications extends React.PureComponent {
|
||||||
key="link"
|
key="link"
|
||||||
style={{color: '#fff'}}
|
style={{color: '#fff'}}
|
||||||
onClick={ev => {
|
onClick={ev => {
|
||||||
window.require('electron').shell.openExternal(ev.target.href);
|
window.require('electron').shell.openExternal(ev.currentTarget.href);
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
}}
|
}}
|
||||||
href={this.props.messageURL}
|
href={this.props.messageURL}
|
||||||
|
|
@ -77,7 +78,7 @@ export default class Notifications extends React.PureComponent {
|
||||||
<a
|
<a
|
||||||
style={{color: '#000'}}
|
style={{color: '#000'}}
|
||||||
onClick={ev => {
|
onClick={ev => {
|
||||||
window.require('electron').shell.openExternal(ev.target.href);
|
window.require('electron').shell.openExternal(ev.currentTarget.href);
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
}}
|
}}
|
||||||
href={`https://github.com/zeit/hyper/releases/tag/${this.props.updateVersion}`}
|
href={`https://github.com/zeit/hyper/releases/tag/${this.props.updateVersion}`}
|
||||||
|
|
@ -105,10 +106,10 @@ export default class Notifications extends React.PureComponent {
|
||||||
fontWeight: 'bold'
|
fontWeight: 'bold'
|
||||||
}}
|
}}
|
||||||
onClick={ev => {
|
onClick={ev => {
|
||||||
window.require('electron').shell.openExternal(ev.target.href);
|
window.require('electron').shell.openExternal(ev.currentTarget.href);
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
}}
|
}}
|
||||||
href={this.props.updateReleaseUrl}
|
href={this.props.updateReleaseUrl!}
|
||||||
>
|
>
|
||||||
Download
|
Download
|
||||||
</a>
|
</a>
|
||||||
Loading…
Reference in a new issue