This repository has been archived by the owner on Jul 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into update-new-versions
- Loading branch information
Showing
6 changed files
with
87 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
|
||
// Styles | ||
const Error = styled.div` | ||
color: white; | ||
text-align: center; | ||
background-color: red; | ||
padding: 5px 0; | ||
font-size: 11px; | ||
`; | ||
|
||
const ErrorView = ({ error }) => { | ||
if (!error) return null; | ||
return <Error>{error}</Error>; | ||
}; | ||
|
||
export default ErrorView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
|
||
const electron = window.require("electron"); | ||
|
||
// Styles | ||
const Announcement = styled.div` | ||
color: white; | ||
text-align: center; | ||
background-color: green; | ||
padding: 5px 0; | ||
font-size: 11px; | ||
cursor: pointer; | ||
`; | ||
|
||
const openExternalLink = url => { | ||
if (!url) return; | ||
electron.shell.openExternal(url); | ||
}; | ||
|
||
const InfoView = ({ announcement }) => { | ||
if (!announcement) return null; | ||
const { text, href } = announcement || {}; | ||
if (!text) return null; | ||
return ( | ||
<Announcement onClick={() => openExternalLink(href)}>{text}</Announcement> | ||
); | ||
}; | ||
|
||
export default InfoView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React from "react"; | ||
|
||
const Loading = () => ( | ||
<div className="bp3-progress-bar bp3-intent-primary"> | ||
<div className="bp3-progress-meter" /> | ||
</div> | ||
); | ||
|
||
export default Loading; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters