openvibers/openvibe.community Commits

Add visit history metadata (#346)

OP OpenVibers committed 3 days ago · 80c8e058d4 · 3 files, +3 −3

Changes

ddiff --git a/server/render/board.js b/server/render/board.js
iindex 60c0da0..05c40c1 100644
---- a/server/render/board.js
++++ b/server/render/board.js
@@@ -261,7 +261,7 @@ function forumTopicPage({ space, thread, posts, page, pages, perPage = 50, viewe
published: thread.created_at || undefined,
modified: (opening && opening.updated_at) || undefined,
active: 'spaces',
-- historyType: 'page',
++ historyType: 'thread',
historyTitle: thread.title,
footerVariant: 'compact',
styles: ['kit.css', ...(attachmentsEnabled ? ['ov-upload.css'] : [])],
ddiff --git a/server/render/forum.js b/server/render/forum.js
iindex 8660f0b..64894a7 100644
---- a/server/render/forum.js
++++ b/server/render/forum.js
@@@ -326,7 +326,7 @@ function threadPage({ space, thread, posts, page, pages, perPage = 50, viewer, u
published: thread.created_at || undefined,
modified: (opening && opening.updated_at) || undefined,
active: 'spaces',
-- historyType: 'page',
++ historyType: 'thread',
historyTitle: thread.title,
footerVariant: 'compact',
styles: ['kit.css', ...(attachmentsEnabled ? ['ov-upload.css'] : [])],
ddiff --git a/server/render/layout.js b/server/render/layout.js
iindex 3d019f7..3a537ba 100644
---- a/server/render/layout.js
++++ b/server/render/layout.js
@@@ -72,7 +72,7 @@ function navbarInit(opts) {
appBar: true, // phones: the four places as the bottom tab bar (Shared 4.20)
search: { page: '/search', label: 'OpenVibe.Community' }, // the magnifier offers this site's own search first
menu: { after: [{ label: 'My pastes', href: '/my', icon: 'fa-paste' }] },
-- history: { type: opts.historyType || 'page', title: opts.historyTitle || opts.title },
++ history: { type: opts.historyType || 'page', title: opts.historyTitle || opts.title, image_url: opts.historyImage || null, private: !!opts.historyPrivate, mature: !!opts.historyMature },
silentLogin: `${config.baseUrl}/auth/login?silent=1&next={url}`,
sessionUrl: '/auth/me',
loginUrl: '/auth/login?next={path}', // filled from the current page (boost moves between pages)