mirror of
https://github.com/idanoo/autobrr
synced 2025-07-26 02:09:13 +00:00
* refactor(APIClient): updated the newly added findQuery function to use URLSearchParams instead of manually crafting the URI string itself. * refactor: moved duplicate dashboard/release code to a separate folder: components/data-table. * refactor(SlideOver): added proper typings to the SlideOver component and added a sanity check to prevent passing of null/undefined values to the child component before rendering. * refactor: removed the redundant Network and Channel typings and updated relevant typings to match the backend. adapted relevant code to match these changes. * fix(ChannelsFieldArray): fixed a bug where it was unable to add a new irc network due to the validation object being initialized as non-empty (formik requires that successful validated entries return empty objects) * refactor(screens/settings/Irc): replaced incorrect typings, sanitized potentially null values and cleaned up the code. * fix: included changes should fix issue #158 as well. * feat: send chan empty array
This commit is contained in:
parent
5a45851677
commit
9ea29d02a2
23 changed files with 974 additions and 1187 deletions
86
web/src/types/Irc.d.ts
vendored
86
web/src/types/Irc.d.ts
vendored
|
@ -2,65 +2,49 @@ interface IrcNetwork {
|
|||
id: number;
|
||||
name: string;
|
||||
enabled: boolean;
|
||||
addr: string;
|
||||
server: string;
|
||||
port: string;
|
||||
nick: string;
|
||||
username: string;
|
||||
realname: string;
|
||||
pass: string;
|
||||
connected: boolean;
|
||||
connected_since: string;
|
||||
tls: boolean;
|
||||
nickserv: {
|
||||
account: string;
|
||||
}
|
||||
channels: IrcNetworkChannel[];
|
||||
}
|
||||
|
||||
interface IrcNetworkChannel {
|
||||
id: number;
|
||||
enabled: boolean;
|
||||
name: string;
|
||||
password: string;
|
||||
detached: boolean;
|
||||
monitoring: boolean;
|
||||
monitoring_since: string;
|
||||
last_announce: string;
|
||||
}
|
||||
|
||||
interface NickServ {
|
||||
account: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
interface Network {
|
||||
id?: number;
|
||||
name: string;
|
||||
enabled: boolean;
|
||||
server: string;
|
||||
port: number;
|
||||
tls: boolean;
|
||||
pass: string;
|
||||
invite_command: string;
|
||||
nickserv: {
|
||||
account: string;
|
||||
password: string;
|
||||
}
|
||||
channels: Channel[];
|
||||
settings: object;
|
||||
nickserv?: NickServ; // optional
|
||||
channels: IrcChannel[];
|
||||
connected: boolean;
|
||||
connected_since: Time;
|
||||
}
|
||||
|
||||
interface Channel {
|
||||
name: string;
|
||||
password: string;
|
||||
interface IrcChannel {
|
||||
id: number;
|
||||
enabled: boolean;
|
||||
name: string;
|
||||
password: string;
|
||||
detached: boolean;
|
||||
monitoring: boolean;
|
||||
}
|
||||
|
||||
interface SASL {
|
||||
mechanism: string;
|
||||
plain: {
|
||||
username: string;
|
||||
password: string;
|
||||
}
|
||||
interface IrcChannelWithHealth extends IrcChannel {
|
||||
monitoring_since: string;
|
||||
last_announce: string;
|
||||
}
|
||||
|
||||
interface IrcNetworkWithHealth {
|
||||
id: number;
|
||||
name: string;
|
||||
enabled: boolean;
|
||||
server: string;
|
||||
port: number;
|
||||
tls: boolean;
|
||||
pass: string;
|
||||
invite_command: string;
|
||||
nickserv?: NickServ; // optional
|
||||
channels: IrcChannelWithHealth[];
|
||||
connected: boolean;
|
||||
connected_since: string;
|
||||
}
|
||||
|
||||
interface NickServ {
|
||||
account?: string; // optional
|
||||
password?: string; // optional
|
||||
}
|
||||
|
||||
interface Config {
|
||||
|
|
7
web/src/types/Release.d.ts
vendored
7
web/src/types/Release.d.ts
vendored
|
@ -33,4 +33,9 @@ interface ReleaseStats {
|
|||
filter_rejected_count: number;
|
||||
push_approved_count: number;
|
||||
push_rejected_count: number;
|
||||
}
|
||||
}
|
||||
|
||||
interface ReleaseFilter {
|
||||
id: string;
|
||||
value: string;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue