mirror of
https://github.com/idanoo/autobrr
synced 2025-07-26 02:09:13 +00:00
feat: show new updates in dashboard (#690)
* feat: show new update banner * feat(http): add request logger * refactor: updates checker * feat: make update check optional * fix: empty releases * add toggle switch for update checks * feat: toggle updates check from settings * feat: toggle updates check from settings * feat: check on toggle enabled --------- Co-authored-by: soup <soup@r4tio.dev>
This commit is contained in:
parent
3fdd7cf5e4
commit
2917a7d42d
24 changed files with 687 additions and 121 deletions
20
web/src/types/Config.d.ts
vendored
Normal file
20
web/src/types/Config.d.ts
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
interface Config {
|
||||
host: string;
|
||||
port: number;
|
||||
log_level: string;
|
||||
log_path: string;
|
||||
base_url: string;
|
||||
check_for_updates: boolean;
|
||||
version: string;
|
||||
commit: string;
|
||||
date: string;
|
||||
}
|
||||
|
||||
interface ConfigUpdate {
|
||||
host?: string;
|
||||
port?: number;
|
||||
log_level?: string;
|
||||
log_path?: string;
|
||||
base_url?: string;
|
||||
check_for_updates: boolean;
|
||||
}
|
11
web/src/types/Irc.d.ts
vendored
11
web/src/types/Irc.d.ts
vendored
|
@ -67,14 +67,3 @@ interface IrcAuth {
|
|||
account?: string; // optional
|
||||
password?: string; // optional
|
||||
}
|
||||
|
||||
interface Config {
|
||||
host: string;
|
||||
port: number;
|
||||
log_level: string;
|
||||
log_path: string;
|
||||
base_url: string;
|
||||
version: string;
|
||||
commit: string;
|
||||
date: string;
|
||||
}
|
46
web/src/types/Update.d.ts
vendored
Normal file
46
web/src/types/Update.d.ts
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
interface UpdateAvailableResponse {
|
||||
id: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface GithubRelease {
|
||||
id: number;
|
||||
node_id: string;
|
||||
url: string;
|
||||
html_url: string;
|
||||
tag_name: string;
|
||||
target_commitish: string;
|
||||
name: string;
|
||||
body: string;
|
||||
created_at: Date;
|
||||
published_at: Date;
|
||||
author: GithubAuthor;
|
||||
assets: GitHubReleaseAsset[];
|
||||
}
|
||||
|
||||
export interface GitHubReleaseAsset {
|
||||
url: string;
|
||||
id: number;
|
||||
node_id: string;
|
||||
name: string;
|
||||
label: string;
|
||||
uploader: GithubAuthor;
|
||||
content_type: string;
|
||||
state: string;
|
||||
size: number;
|
||||
download_count: number;
|
||||
created_at: Date;
|
||||
updated_at: Date;
|
||||
browser_download_url: string;
|
||||
}
|
||||
|
||||
export interface GithubAuthor {
|
||||
login: string;
|
||||
id: number;
|
||||
node_id: string;
|
||||
avatar_url: string;
|
||||
gravatar_id: string;
|
||||
url: string;
|
||||
html_url: string;
|
||||
type: string;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue