openvibers/openvibe.network Commits
openvibe.network turns on the realtime notification badge first (notificationsRealtime: true on the home page and My account; Shared 1.22.0): a new notification reaches the badge over Events realtime with a single-use ticket, polling stays the fallback
Changes
@@@ -206,7 +206,7 @@ footer{border-top:1px solid var(--border);background:var(--bg-secondary)}function initNavbar(user) {if (typeof OpenVibeNavbar !== 'undefined') {-- OpenVibeNavbar.init({ service: 'network', token: token || null, user: user || null, links: [{ label: 'My Account', href: '/my' }, { label: 'Themes', href: '/themes' }], networkLinks: 5 });++ OpenVibeNavbar.init({ service: 'network', notificationsRealtime: true, token: token || null, user: user || null, links: [{ label: 'My Account', href: '/my' }, { label: 'Themes', href: '/themes' }], networkLinks: 5 });}if (user) {document.getElementById('hero-guest-ctas').style.display = 'none';@@@ -1197,7 +1197,7 @@ async function loadUser() {applyAnonModeUI(currentUser);loadAccounts();loadAnonInfo();-- OpenVibeNavbar.init({ service: 'network', token: null, user: currentUser });++ OpenVibeNavbar.init({ service: 'network', notificationsRealtime: true, token: null, user: currentUser });} else {const data = await apiFetch('/api/auth/me');currentUser = data.user;@@@ -1214,7 +1214,7 @@ async function loadUser() {loadRecentTools();// Init navbar-- OpenVibeNavbar.init({ service: 'network', token: authToken, user: currentUser });++ OpenVibeNavbar.init({ service: 'network', notificationsRealtime: true, token: authToken, user: currentUser });const bellMount = OpenVibeNavbar.getBellMount();if (bellMount && window.OpenVibeNotifications && authToken) {OpenVibeNotifications.init({ token: authToken, apiBase: API, swPath: '/openvibe-sw.js' });
@@ -206,7 +206,7 @@ footer{border-top:1px solid var(--border);background:var(--bg-secondary)}
@@ -206,7 +206,7 @@ footer{border-top:1px solid var(--border);background:var(--bg-secondary)}
function initNavbar(user) {
function initNavbar(user) {
if (typeof OpenVibeNavbar !== 'undefined') {
if (typeof OpenVibeNavbar !== 'undefined') {
- OpenVibeNavbar.init({ service: 'network', token: token || null, user: user || null, links: [{ label: 'My Account', href: '/my' }, { label: 'Themes', href: '/themes' }], networkLinks: 5 });
+ OpenVibeNavbar.init({ service: 'network', notificationsRealtime: true, token: token || null, user: user || null, links: [{ label: 'My Account', href: '/my' }, { label: 'Themes', href: '/themes' }], networkLinks: 5 });
}
}
if (user) {
if (user) {
document.getElementById('hero-guest-ctas').style.display = 'none';
document.getElementById('hero-guest-ctas').style.display = 'none';
@@ -1197,7 +1197,7 @@ async function loadUser() {
@@ -1197,7 +1197,7 @@ async function loadUser() {
applyAnonModeUI(currentUser);
applyAnonModeUI(currentUser);
loadAccounts();
loadAccounts();
loadAnonInfo();
loadAnonInfo();
- OpenVibeNavbar.init({ service: 'network', token: null, user: currentUser });
+ OpenVibeNavbar.init({ service: 'network', notificationsRealtime: true, token: null, user: currentUser });
} else {
} else {
const data = await apiFetch('/api/auth/me');
const data = await apiFetch('/api/auth/me');
currentUser = data.user;
currentUser = data.user;
@@ -1214,7 +1214,7 @@ async function loadUser() {
@@ -1214,7 +1214,7 @@ async function loadUser() {
loadRecentTools();
loadRecentTools();
// Init navbar
// Init navbar
- OpenVibeNavbar.init({ service: 'network', token: authToken, user: currentUser });
+ OpenVibeNavbar.init({ service: 'network', notificationsRealtime: true, token: authToken, user: currentUser });
const bellMount = OpenVibeNavbar.getBellMount();
const bellMount = OpenVibeNavbar.getBellMount();
if (bellMount && window.OpenVibeNotifications && authToken) {
if (bellMount && window.OpenVibeNotifications && authToken) {
OpenVibeNotifications.init({ token: authToken, apiBase: API, swPath: '/openvibe-sw.js' });
OpenVibeNotifications.init({ token: authToken, apiBase: API, swPath: '/openvibe-sw.js' });