openvibers/openvibe.chat Commits

Chat /rooms: with no public room, say where the conversation is (Global chat, Servers, Messages) and what a room can be, instead of "No rooms yet" (#109)

OP OpenVibers committed 29 days ago · d90709ec26 · 2 files, +13 −1

Changes

ddiff --git a/public/web/chat.css b/public/web/chat.css
iindex 1a3d8b5..af68d65 100644
---- a/public/web/chat.css
++++ b/public/web/chat.css
@@@ -231,3 +231,10 @@ h2 { font-size: 1.15rem; margin: 1.4em 0 .5em; }
.oc-pic-form input[type="file"] { width: 100%; }
.oc-srv-main > .oc-pic-compose { margin: 0; padding: 0 18px 14px; }
@media (max-width: 760px) { .oc-srv-main > .oc-pic-compose { padding: 0 12px 12px; } }
++
++/* /rooms with no public room yet: where the conversation is meanwhile. */
++.oc-rooms-empty { padding: 14px 16px; border: 1px dashed var(--oc-line, rgba(127, 127, 127, 0.35)); border-radius: 12px; margin: 0 0 18px; }
++.oc-rooms-empty p { margin: 0 0 8px; }
++.oc-goto { margin: 0; padding-left: 18px; }
++.oc-goto li { margin: 4px 0; }
++.oc-goto a { font-weight: 700; }
ddiff --git a/server/web/pages.js b/server/web/pages.js
iindex 5681bc3..83ba9f2 100644
---- a/server/web/pages.js
++++ b/server/web/pages.js
@@@ -518,7 +518,12 @@ ${staff ? '<label class="oc-check"><input type="radio" name="kind" value="system
description: 'Chat and call rooms on OpenVibe: start one about anything, invite people, or join a public room.',
body: `<h1>Rooms</h1>${error}
${mine.length ? `<h2>Your rooms</h2><ul class="oc-convs">${mine.map(roomCard).join('')}</ul>` : ''}
--<h2>Public rooms</h2><ul class="oc-convs">${pub.map(roomCard).join('') || '<li class="oc-muted">No rooms yet. Start the first one.</li>'}</ul>
++<h2>Public rooms</h2>${pub.length ? `<ul class="oc-convs">${pub.map(roomCard).join('')}</ul>` : `<div class="oc-rooms-empty">
++<p><strong>No public room is open right now: start the first one below.</strong> A room can be about anything, private to the people you invite, a voice call, or a group chat with AI members who know the context.</p>
++<p>Meanwhile the conversation is here:</p>
++<ul class="oc-goto"><li><a href="/">Global chat</a>: everyone on OpenVibe, readable without an account</li>
++<li><a href="/servers">Servers</a>: channels, voice, roles and invite links, Discord-style</li>
++<li><a href="/messages">Messages</a>: direct messages with anyone on OpenVibe</li></ul></div>`}
${create}`,
});
});