MCPcopy Create free account
hub / github.com/Muhammadsiddiq-code/Admin-dashboard / initializeApp

Function initializeApp

app.js:123–146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

121})
122
123function initializeApp() {
124 // Check if user is logged in
125 const savedUser = localStorage.getItem("currentUser")
126 if (savedUser) {
127 currentUser = JSON.parse(savedUser)
128 showAdminPanel()
129 } else {
130 showLoginPage()
131 }
132
133 // Apply saved theme
134 applyTheme(currentTheme)
135
136 // Apply saved language
137 applyLanguage(currentLanguage)
138
139 // Setup event listeners
140 setupEventListeners()
141
142 // Initialize sidebar state
143 if (sidebarCollapsed) {
144 document.querySelector(".sidebar").classList.add("collapsed")
145 }
146}
147
148function setupEventListeners() {
149 // Login form

Callers 1

app.jsFile · 0.85

Calls 5

showAdminPanelFunction · 0.85
showLoginPageFunction · 0.85
applyThemeFunction · 0.85
applyLanguageFunction · 0.85
setupEventListenersFunction · 0.85

Tested by

no test coverage detected