v1.4.3/members and version handling
This commit is contained in:
+10
-7
@@ -26,7 +26,8 @@ import 'firebase/firestore';
|
||||
import Inactive from './Inactive';
|
||||
import { getUserUid, getPlayerSource, PLAYER_SOURCE } from './Api';
|
||||
|
||||
const APP_VERSION = '1.4.0';
|
||||
const APP_VERSION = '1.4.3';
|
||||
const APP_VERSION_STRING = APP_VERSION.replace(/\./g, '');
|
||||
|
||||
const darkTheme = createMuiTheme({
|
||||
palette: {
|
||||
@@ -55,10 +56,6 @@ const Routes = (props) => (
|
||||
</Router>
|
||||
);
|
||||
|
||||
const wrongVersionStatus = {
|
||||
message: `Looks like Watch Party needs to update.\nGo to chrome://extensions to manually update.\nExpected version v${APP_VERSION}`,
|
||||
};
|
||||
|
||||
const App = () => {
|
||||
const closedNotification = { open: false, message: '' };
|
||||
|
||||
@@ -129,13 +126,19 @@ const App = () => {
|
||||
<div className="party-content-wrapper">
|
||||
<div id="party-routes-wrapper">
|
||||
{loading && <Loading />}
|
||||
{status.active2 && status.version === APP_VERSION ? (
|
||||
{status[APP_VERSION_STRING] && status[APP_VERSION_STRING].active === true ? (
|
||||
<Routes
|
||||
updateLoading={setLoading}
|
||||
notify={(message) => setNotification({ open: true, message })}
|
||||
/>
|
||||
) : (
|
||||
<Inactive status={status.version !== APP_VERSION ? wrongVersionStatus : status} />
|
||||
<Inactive
|
||||
status={
|
||||
status[APP_VERSION_STRING]
|
||||
? status[APP_VERSION_STRING].message
|
||||
: 'Uh oh, looks like our servers are down right now.'
|
||||
}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<Fab onClick={() => setVisible(!visible)} className="watch-party-fab">
|
||||
|
||||
Reference in New Issue
Block a user