ZHIWEI666 commited on
Commit
56fcd6e
·
verified ·
1 Parent(s): 31ef38b

Upload 前端页面/components/顶部导航组件.js

Browse files
前端页面/components/顶部导航组件.js CHANGED
@@ -84,6 +84,8 @@ export function createTopNav() {
84
  bellBtn.setAttribute("aria-label", t('social.notifications'));
85
 
86
  let currentUser = null;
 
 
87
  const sessionStorages = () => ['localStorage', 'sessionStorage'].map(name => { try { return window[name]; } catch (_) { return null; } });
88
  const restoredSession = readUserSession(sessionStorages(), CACHE.LEGACY_KEYS);
89
  currentUser = restoredSession?.user || null;
 
84
  bellBtn.setAttribute("aria-label", t('social.notifications'));
85
 
86
  let currentUser = null;
87
+ chatEntryBtn.onclick = () => openChatModal(currentUser);
88
+ bellBtn.onclick = () => openNotificationCenter(currentUser, bellBtn);
89
  const sessionStorages = () => ['localStorage', 'sessionStorage'].map(name => { try { return window[name]; } catch (_) { return null; } });
90
  const restoredSession = readUserSession(sessionStorages(), CACHE.LEGACY_KEYS);
91
  currentUser = restoredSession?.user || null;