mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
feat(blotter): replace board stats with changelog-backed blotter
Add static blotter snapshot, route /blotter, compact board blotter (Hide/Show All). Include yarn blotter tooling and AGENTS rules so every changelog version has a release line. 4chan-style table UI, subplebbit→board and plebchan→5chan in messages.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
.versionLink {
|
||||
color: var(--button-desktop-text-color);
|
||||
text-decoration: var(--button-text-decoration);
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.versionLink:hover {
|
||||
color: var(--button-desktop-text-color-hover);
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import type { BlotterEntry } from '../../lib/utils/blotter-utils';
|
||||
import styles from './blotter-message.module.css';
|
||||
|
||||
const RELEASES_BASE = 'https://github.com/bitsocialhq/5chan/releases/tag/v';
|
||||
|
||||
function normalizeMessage(text: string): string {
|
||||
return text.replace(/subplebbit/gi, 'board').replace(/plebchan/gi, '5chan');
|
||||
}
|
||||
|
||||
const BlotterMessage = ({ entry }: { entry: BlotterEntry }) => {
|
||||
if (entry.kind === 'release' && entry.version) {
|
||||
const idx = entry.message.indexOf(': ');
|
||||
const oneLiner = idx >= 0 ? entry.message.slice(idx + 2) : entry.message;
|
||||
return (
|
||||
<>
|
||||
<a href={`${RELEASES_BASE}${entry.version}`} className={styles.versionLink} target='_blank' rel='noopener noreferrer'>
|
||||
v{entry.version}
|
||||
</a>
|
||||
: {normalizeMessage(oneLiner)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
return <>{normalizeMessage(entry.message)}</>;
|
||||
};
|
||||
|
||||
export default BlotterMessage;
|
||||
@@ -0,0 +1 @@
|
||||
export { default } from './blotter-message';
|
||||
Reference in New Issue
Block a user