Skip to content

Commit 21a6360

Browse files
committed
Add news for the fake google play store listing
1 parent 598e0a8 commit 21a6360

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

src/components/menu-bar/menu-bar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ class MenuBar extends React.Component {
10471047
return (
10481048
<React.Fragment>
10491049
{menuBar}
1050-
{/* <TWNews /> */}
1050+
<TWNews />
10511051
</React.Fragment>
10521052
);
10531053
}

src/components/menu-bar/tw-news.jsx

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,16 @@ import CloseButton from '../close-button/close-button.jsx';
55
import styles from './tw-news.css';
66

77
const LOCAL_STORAGE_KEY = 'tw:closedNews';
8-
const NEWS_ID = 'new-compiler';
8+
const NEWS_ID = 'android-fraud';
9+
10+
const newsAppliesToUser = () => /android/i.test(navigator.userAgent);
11+
12+
const NewsBody = () => (
13+
<div className={styles.text}>
14+
{/* eslint-disable-next-line max-len */}
15+
{`The ${APP_NAME} app in the Google Play Store is illegitimate and outdated. If you were misled into installing it, leave a 1 star review, uninstall it, and report it. An official one will exist eventually.`}
16+
</div>
17+
);
918

1019
const getIsClosedInLocalStorage = () => {
1120
try {
@@ -27,7 +36,7 @@ class TWNews extends React.Component {
2736
constructor (props) {
2837
super(props);
2938
this.state = {
30-
closed: getIsClosedInLocalStorage()
39+
closed: getIsClosedInLocalStorage() || !newsAppliesToUser()
3140
};
3241
this.handleClose = this.handleClose.bind(this);
3342
}
@@ -45,17 +54,7 @@ class TWNews extends React.Component {
4554
}
4655
return (
4756
<div className={styles.news}>
48-
<div className={styles.text}>
49-
{/* eslint-disable-next-line max-len */}
50-
{`We rewrote the ${APP_NAME} compiler to make projects run even faster. Bugs are possible. `}
51-
<a
52-
href="https://docs.turbowarp.org/new-compiler"
53-
target="_blank"
54-
rel="noreferrer"
55-
>
56-
{'Learn more.'}
57-
</a>
58-
</div>
57+
<NewsBody />
5958
<CloseButton
6059
className={styles.close}
6160
onClick={this.handleClose}

0 commit comments

Comments
 (0)