This repository has been archived by the owner on Sep 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add deprecation message and link to web UI.
- Loading branch information
Showing
6 changed files
with
65 additions
and
5 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,12 @@ | ||
.deprecationNotice { | ||
background-color: #282629; | ||
color: #FFFCFF; | ||
padding: 0.75em; | ||
text-align: center; | ||
} | ||
|
||
.deprecationNotice a { | ||
color: #66BFFF; | ||
text-decoration: underline; | ||
cursor: pointer; | ||
} |
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,40 @@ | ||
import React from 'react'; | ||
import { shell } from 'electron'; | ||
import qs from 'qs'; | ||
import { connect } from 'react-redux'; | ||
import { External } from './Icons'; | ||
import Emoji from './Emoji'; | ||
import css from './DeprecationNotice.css'; | ||
|
||
const getQueryString = colorSets => qs.stringify( | ||
{ | ||
colors: colorSets, | ||
activeColorSet: Object.values(colorSets.dark).filter(Boolean).length ? 'dark' : 'light', | ||
calculateIntermediaryShades: { | ||
dark: false, | ||
light: false, | ||
} | ||
}, | ||
{ allowDots: true }, | ||
); | ||
|
||
const DeprecationNotice = ({ colorSets }) => ( | ||
<div className={ css.deprecationNotice }> | ||
<Emoji emoji="⚠️"/> | ||
{' '} | ||
Heads up: this GUI for themer has been deprecated. | ||
{' '} | ||
<a onClick={ () => shell.openExternal(`https://themer.mjswensen.com?${getQueryString(colorSets)}`) }> | ||
Open current theme in the new Web UI | ||
<External /> | ||
</a> | ||
</div> | ||
); | ||
|
||
const mapStateToProps = state => ({ | ||
colorSets: state.colorSets | ||
}); | ||
|
||
export default connect( | ||
mapStateToProps, | ||
)(DeprecationNotice); |