mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-26 19:40:51 +08:00
feat: fix search, poster serving, and add hover overlay UI for cards
- Fix search store exports to match component expectations (inputValue, bangumiList, onSearch) and transform data to SearchResult format - Fix poster endpoint path check that incorrectly blocked all requests - Add resolvePosterUrl utility to handle both external URLs and local paths - Move tags into hover overlay on homepage cards and calendar cards - Show title and tags on poster hover with dark semi-transparent styling - Add downloader API, store, and page - Update backend to async patterns and uv migration changes - Remove .claude/settings.local.json from tracking Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
35
webui/src/api/downloader.ts
Normal file
35
webui/src/api/downloader.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import type { QbTorrentInfo } from '#/downloader';
|
||||
import type { ApiSuccess } from '#/api';
|
||||
|
||||
export const apiDownloader = {
|
||||
async getTorrents() {
|
||||
const { data } = await axios.get<QbTorrentInfo[]>(
|
||||
'api/v1/downloader/torrents'
|
||||
);
|
||||
return data!;
|
||||
},
|
||||
|
||||
async pause(hashes: string[]) {
|
||||
const { data } = await axios.post<ApiSuccess>(
|
||||
'api/v1/downloader/torrents/pause',
|
||||
{ hashes }
|
||||
);
|
||||
return data!;
|
||||
},
|
||||
|
||||
async resume(hashes: string[]) {
|
||||
const { data } = await axios.post<ApiSuccess>(
|
||||
'api/v1/downloader/torrents/resume',
|
||||
{ hashes }
|
||||
);
|
||||
return data!;
|
||||
},
|
||||
|
||||
async deleteTorrents(hashes: string[], deleteFiles: boolean = false) {
|
||||
const { data } = await axios.post<ApiSuccess>(
|
||||
'api/v1/downloader/torrents/delete',
|
||||
{ hashes, delete_files: deleteFiles }
|
||||
);
|
||||
return data!;
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user