mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
feat(irc): add bouncer/znc support (#951)
* feat(irc): add initial bouncer support * feat(irc): add bouncer fields to irc update form * fix: make fields optional * feat(db): add migrations
This commit is contained in:
parent
28f0b878e1
commit
2677c16ff8
8 changed files with 79 additions and 29 deletions
|
@ -235,6 +235,8 @@ interface IrcNetworkUpdateFormValues {
|
|||
nick: string;
|
||||
auth?: IrcAuth;
|
||||
invite_command: string;
|
||||
use_bouncer: boolean;
|
||||
bouncer_addr: string;
|
||||
channels: Array<IrcChannel>;
|
||||
}
|
||||
|
||||
|
@ -288,6 +290,8 @@ export function IrcNetworkUpdateForm({
|
|||
pass: network.pass,
|
||||
auth: network.auth,
|
||||
invite_command: network.invite_command,
|
||||
use_bouncer: network.use_bouncer,
|
||||
bouncer_addr: network.bouncer_addr,
|
||||
channels: network.channels
|
||||
};
|
||||
|
||||
|
@ -340,6 +344,15 @@ export function IrcNetworkUpdateForm({
|
|||
required={true}
|
||||
/>
|
||||
|
||||
<SwitchGroupWide name="use_bouncer" label="Bouncer (BNC)" />
|
||||
{values.use_bouncer && (
|
||||
<TextFieldWide
|
||||
name="bouncer_addr"
|
||||
label="Bouncer address"
|
||||
help="Address: Eg bouncer.server.net:6697"
|
||||
/>
|
||||
)}
|
||||
|
||||
<div className="border-t border-gray-200 dark:border-gray-700 py-5">
|
||||
<div className="px-4 space-y-1 mb-8">
|
||||
<Dialog.Title className="text-lg font-medium text-gray-900 dark:text-white">Identification</Dialog.Title>
|
||||
|
|
6
web/src/types/Irc.d.ts
vendored
6
web/src/types/Irc.d.ts
vendored
|
@ -14,6 +14,8 @@ interface IrcNetwork {
|
|||
pass: string;
|
||||
auth: IrcAuth; // optional
|
||||
invite_command: string;
|
||||
use_bouncer: boolean;
|
||||
bouncer_addr: string;
|
||||
channels: IrcChannel[];
|
||||
connected: boolean;
|
||||
connected_since: string;
|
||||
|
@ -29,6 +31,8 @@ interface IrcNetworkCreate {
|
|||
nick: string;
|
||||
auth: IrcAuth; // optional
|
||||
invite_command: string;
|
||||
use_bouncer?: boolean;
|
||||
bouncer_addr?: string;
|
||||
channels: IrcChannel[];
|
||||
connected: boolean;
|
||||
}
|
||||
|
@ -58,6 +62,8 @@ interface IrcNetworkWithHealth {
|
|||
nick: string;
|
||||
auth: IrcAuth; // optional
|
||||
invite_command: string;
|
||||
use_bouncer: boolean;
|
||||
bouncer_addr: string;
|
||||
channels: IrcChannelWithHealth[];
|
||||
connected: boolean;
|
||||
connected_since: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue