From 8500b3fb09fa8889796390638dd0076aacb28e82 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Thu, 3 Mar 2022 06:13:17 -0500 Subject: [PATCH] not on macs yet --- packages/fakeyou/src/App.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/fakeyou/src/App.tsx b/packages/fakeyou/src/App.tsx index b78819fcbd..f11c73ab4a 100644 --- a/packages/fakeyou/src/App.tsx +++ b/packages/fakeyou/src/App.tsx @@ -102,6 +102,14 @@ function newVocodes() { return discord || twitter || alphaCookie; } +function isMacOs() { + // Not on macs yet + // https://stackoverflow.com/a/38241481 + const platform = window.navigator.platform; + const macPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K', 'darwin']; + return (macPlatforms.indexOf(platform) !== -1); +} + // TODO: Port to functional component class App extends React.Component { @@ -112,6 +120,8 @@ class App extends React.Component { const migrationMode = enableAlpha ? MigrationMode.NEW_VOCODES : MigrationMode.OLD_VOCODES; + const showTwitchNotice = !isMacOs(); + this.state = { enableAlpha: enableAlpha, migrationMode: migrationMode, @@ -125,7 +135,7 @@ class App extends React.Component { displayLanguage: Language.English, primaryLanguageCode: 'en', - isShowingTwitchTtsNotice: true, + isShowingTwitchTtsNotice: showTwitchNotice, ttsInferenceJobs: [], w2lInferenceJobs: [],