aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/Main.tsx
diff options
context:
space:
mode:
authorSophie Zhang <sophie_zhang@brown.edu>2023-07-18 15:06:22 -0400
committerSophie Zhang <sophie_zhang@brown.edu>2023-07-18 15:06:22 -0400
commit40784b7265851b27e043c07e5f9038a0b29af8b7 (patch)
tree1f9e154913820cc1cb5952a9d444d9a0eca86c29 /src/client/views/Main.tsx
parent162ca319eae256be523f2ee75e7aae7a9a408e37 (diff)
parent267f5d7c6a87b955c2fa2121c6db7e01cfc1c148 (diff)
Merge branch 'master' into sophie-ai-images
Diffstat (limited to 'src/client/views/Main.tsx')
-rw-r--r--src/client/views/Main.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx
index 6b18caed0..2fa42d091 100644
--- a/src/client/views/Main.tsx
+++ b/src/client/views/Main.tsx
@@ -15,6 +15,8 @@ import { TrackMovements } from '../util/TrackMovements';
import { CollectionView } from './collections/CollectionView';
import { MainView } from './MainView';
import * as dotenv from 'dotenv'; // see https://github.com/motdotla/dotenv#how-do-i-use-dotenv-with-import
+import { PingManager } from '../util/PingManager';
+import './global/globalScripts';
dotenv.config();
AssignAllExtensions();
@@ -26,7 +28,7 @@ FieldLoader.ServerLoadStatus = { requested: 0, retrieved: 0 }; // bcz: not sure
root.render(<FieldLoader />);
window.location.search.includes('safe') && CollectionView.SetSafeMode(true);
const info = await CurrentUserUtils.loadCurrentUser();
- if (info.email === 'guest') DocServer.Control.makeReadOnly();
+ // if (info.email === 'guest') DocServer.Control.makeReadOnly();
await CurrentUserUtils.loadUserDocument(info.id);
setTimeout(() => {
document.getElementById('root')!.addEventListener(
@@ -45,9 +47,9 @@ FieldLoader.ServerLoadStatus = { requested: 0, retrieved: 0 }; // bcz: not sure
d.setTime(d.getTime() + 100 * 24 * 60 * 60 * 1000);
const expires = 'expires=' + d.toUTCString();
document.cookie = `loadtime=${loading};${expires};path=/`;
- new LinkManager();
new TrackMovements();
new ReplayMovements();
+ new PingManager();
root.render(<MainView />);
}, 0);
})();