mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
feat(p2p stats): redesign connected peers with world map and country flags
Restyle the connected-peers list in the classic square, flat imageboard style, move it to the end of the panel, and open it by default. Add an offline approximate world map and per-peer country flags (sprite order taken from the original 4chan flags.css), plus codify the old-school design rules in DESIGN.md and point agents to them from AGENTS.md.
This commit is contained in:
+4
-3
@@ -132,13 +132,14 @@ describe('P2PStatsSettings', () => {
|
||||
await act(async () => Promise.resolve());
|
||||
|
||||
const rows = getStatRows();
|
||||
const connectedPeers = container.querySelector('[data-testid="connected-peers"]');
|
||||
expect(container.textContent).toContain('Leeching');
|
||||
expect(container.textContent).not.toContain('browser Helia');
|
||||
expect(container.textContent).not.toContain('seed mode');
|
||||
expect(container.textContent).not.toContain('status');
|
||||
expect(rows.get('Connected peers')).toContain('2 peers, 1 connection');
|
||||
expect(rows.get('Connected peers')).toContain('WebSocket');
|
||||
expect(rows.get('Connected peers')).toContain('/ip4/127.0.0.1/tcp/4001/ws/p2p/peer-1');
|
||||
expect(connectedPeers?.textContent).toContain('2 peers, 1 connection');
|
||||
expect(connectedPeers?.textContent).toContain('WebSocket');
|
||||
expect(connectedPeers?.textContent).toContain('/ip4/127.0.0.1/tcp/4001/ws/p2p/peer-1');
|
||||
expect(rows.has('connections')).toBe(false);
|
||||
expect(rows.has('Listen addresses')).toBe(false);
|
||||
expect(rows.has('p2p_stats_updated')).toBe(true);
|
||||
|
||||
Reference in New Issue
Block a user