bigly-chat/client/main.js

23 lines
801 B
JavaScript
Raw Normal View History

2024-09-07 18:12:58 -04:00
import Route from "../route.js";
2024-09-08 05:04:57 -04:00
import auth from "../form/auth.js";
import format from "../common/format.js";
2024-09-07 18:12:58 -04:00
2024-09-08 05:04:57 -04:00
let main = new Route([auth], async function (req, res, input) {
let { username } = input;
let cta = (username == '!nobody') ?
'<div class="button"><a href="/client/register">Join</a></div>' :
'<div class="button"><a href="/client/chat?channel=main">Chat</a></div>';
return `<div class='area'>
<h1>About</h1>
<p>
<b>BiglyChat</b> is a chat service built on <a href='https://codeberg.org/onezDerv/bigly-chat'>free software</a>.
</p>
<p>
Anyone can selfhost an instance to take control of their community.
</p>
${cta}
</div>`
2024-09-07 18:12:58 -04:00
});
export default main;