From f6ee2e3d7e4d25088202f7b6ca598afeb7f660e7 Mon Sep 17 00:00:00 2001 From: Salastil Date: Fri, 28 Aug 2026 01:11:56 -0400 Subject: [PATCH] Offer the IRC networks people actually join Issues #12 and #13. Typing a hostname and port correctly is the one step of adding an IRC account where a small mistake looks like the server being down, so the common networks are offered ready-made and fill the fields - which stay editable, and a network not on the list is typed in exactly as before. The same table gives each of those networks its own colour and letters in the rail, instead of the identical "#" every IRC account shared - telling one entry from another being the thing that column exists for. Initials rather than logos, deliberately: those belong to the networks that own them, and a wrong-looking copy of somebody's logo is worse than two clean letters. Co-Authored-By: Claude Opus 5 --- src/renderer/src/components/AccountsPanel.tsx | 27 ++++++++++ src/renderer/src/components/ServerRail.tsx | 14 +++++ src/renderer/src/lib/networks.ts | 52 +++++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 src/renderer/src/lib/networks.ts diff --git a/src/renderer/src/components/AccountsPanel.tsx b/src/renderer/src/components/AccountsPanel.tsx index 978235e..566c5e8 100644 --- a/src/renderer/src/components/AccountsPanel.tsx +++ b/src/renderer/src/components/AccountsPanel.tsx @@ -3,6 +3,7 @@ import { Icon, IconButton, MaskIcon } from './Icon' import { MatrixAccountTools } from './MatrixAccountTools' import { useChat, usePref, useStore } from '../state/hooks' import { bufferDisplayName, resolveMediaUrl, serviceIcon, serviceLabel } from '../lib/util' +import { IRC_NETWORKS, ircNetworkFor } from '../lib/networks' import type { Account } from '../../../shared/wire' const ADDABLE = ['irc', 'discord', 'sockchat', 'matrix'] as const @@ -380,6 +381,32 @@ function IrcForm({ onDone }: { onDone: () => void }): JSX.Element { Nickname setNick(e.target.value)} /> + {/* Typing a hostname and port correctly is the one step here where a + small mistake looks like the server being down, so the networks + people actually join are offered ready-made. Choosing one fills + the fields rather than hiding them: they stay editable, and a + network not on the list is typed in exactly as before. */} +