feat(irc): view announces per channel (#948)

* feat(irc): add sse to handler

* feat(irc): view and send irc messages per network

* refactor(irc): use id as handlerkey

* refactor(irc): use id as handlerkey

* feat(web): add irc context

* refactor: create sse stream per network channel

* fix(irc): remove non-working wildcard callback handler

* feat: use fork of sse

* chore(deps): update ergo/irc-go to v0.3.0

* fix: clean irc msg before sse publish

* feat: add view channel button

* feat: styling improvements

* feat: show time
This commit is contained in:
ze0s 2023-05-21 15:51:40 +02:00 committed by GitHub
parent bbfcf303ef
commit ccabe96bdf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 446 additions and 125 deletions

View file

@ -150,7 +150,9 @@ export const APIClient = {
createNetwork: (network: IrcNetworkCreate) => appClient.Post("api/irc", network),
updateNetwork: (network: IrcNetwork) => appClient.Put(`api/irc/network/${network.id}`, network),
deleteNetwork: (id: number) => appClient.Delete(`api/irc/network/${id}`),
restartNetwork: (id: number) => appClient.Get(`api/irc/network/${id}/restart`)
restartNetwork: (id: number) => appClient.Get(`api/irc/network/${id}/restart`),
sendCmd: (cmd: SendIrcCmdRequest) => appClient.Post(`api/irc/network/${cmd.network_id}/cmd`, cmd),
events: (network: string) => new EventSource(`${sseBaseUrl()}api/irc/events?stream=${network}`, { withCredentials: true })
},
logs: {
files: () => appClient.Get<LogFileResponse>("api/logs/files"),