diff --git a/public/s/css/f0ckm.css b/public/s/css/f0ckm.css index ddf3d4c..bd4daaa 100644 --- a/public/s/css/f0ckm.css +++ b/public/s/css/f0ckm.css @@ -9681,7 +9681,7 @@ html[theme="f0ck95d"] .badge-dark { } .steuerung { - font-size: large; + font-size: x-large; font-family: monospace; } diff --git a/src/inc/routes/comments.mjs b/src/inc/routes/comments.mjs index 6415b13..6d18764 100644 --- a/src/inc/routes/comments.mjs +++ b/src/inc/routes/comments.mjs @@ -972,6 +972,15 @@ export default (router, tpl) => { // Recent Activity Page router.get(/\/activity\/?/, async (req, res) => { + if (!req.session && cfg.main.hide_comments_from_public) { + if (req.url.qs?.json === 'true' || req.headers['x-requested-with'] === 'XMLHttpRequest') { + return res.reply({ + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ success: true, comments: [], page: 1, hasMore: false, require_login: true }) + }); + } + return res.reply({ code: 403, body: "Forbidden" }); + } try { const page = +(req.url.qs?.page || 1); const limit = Math.min(+(req.url.qs?.limit || 50), 50); diff --git a/src/inc/routes/notifications.mjs b/src/inc/routes/notifications.mjs index cd4fa15..2919cc1 100644 --- a/src/inc/routes/notifications.mjs +++ b/src/inc/routes/notifications.mjs @@ -142,8 +142,9 @@ db.listen('activity', async (payload) => { data.username = 'System'; } - // Broadcast to ALL connected clients + // Broadcast to ALL connected clients (except guests if comments are hidden) for (const client of clients) { + if (!client.userId && cfg.main.hide_comments_from_public) continue; client.send({ type: 'activity', data }); } } catch (e) { diff --git a/src/index.mjs b/src/index.mjs index 3cc4611..66eb20f 100644 --- a/src/index.mjs +++ b/src/index.mjs @@ -1277,6 +1277,7 @@ process.on('uncaughtException', err => { enable_item_title: cfg.websrv.enable_item_title !== false, enable_global_chat: !!cfg.websrv.enable_global_chat, enable_sidebar: cfg.websrv.enable_sidebar !== false, + sidebar_closed_default: cfg.websrv.sidebar_closed_default === true, embed_youtube_in_comments: cfg.websrv.embed_youtube_in_comments !== false, get koepfe_json() { try { diff --git a/views/snippets/header.html b/views/snippets/header.html index 74af876..569b1f3 100644 --- a/views/snippets/header.html +++ b/views/snippets/header.html @@ -78,7 +78,7 @@
- + @if(!private_society || session) @endif