cursor done.
This commit is contained in:
24
public/js/main.js
Normal file
24
public/js/main.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import CalendarView from './calendar.js';
|
||||
import ServerManager from './serverManager.js';
|
||||
import AuthManager from './auth.js';
|
||||
|
||||
let authManagerRef = null;
|
||||
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
const calendarView = new CalendarView({
|
||||
onUnauthorized: () => authManagerRef && authManagerRef.logout()
|
||||
});
|
||||
calendarView.init();
|
||||
|
||||
const serverManager = new ServerManager();
|
||||
serverManager.init();
|
||||
|
||||
authManagerRef = new AuthManager(calendarView, serverManager);
|
||||
authManagerRef.init();
|
||||
|
||||
serverManager.onChange((server) => {
|
||||
authManagerRef.handleServerSelection(server);
|
||||
});
|
||||
|
||||
authManagerRef.checkExistingSession();
|
||||
});
|
||||
Reference in New Issue
Block a user