feat(frontend): storage shows the heaviest chats, a chat opens its own files with selective cleanup and a whole-chat move to trash
This commit is contained in:
1 parent
5eacabd101
commit
7f124059be
9 files changed
+671
-232
No files matched your search
@@ -34,6 +34,7 @@ import type {
|
||||
ResponseStats,
|
||||
ScopeTarget,
|
||||
SearchHit,
|
||||
StorageChat,
|
||||
StorageFile,
|
||||
StorageGroupName,
|
||||
StorageScope,
|
||||
@@ -608,15 +609,31 @@ export function removeWatchedBot(botId: number): Promise<void> {
|
||||
return request<void>(`/bots/${botId}`, { method: "DELETE" });
|
||||
}
|
||||
|
||||
export function getStorageSummary(): Promise<StorageSummary> {
|
||||
return request<StorageSummary>("/storage/summary", { account: true });
|
||||
export function getStorageSummary(
|
||||
chatId: number | null = null
|
||||
): Promise<StorageSummary> {
|
||||
return request<StorageSummary>("/storage/summary", {
|
||||
account: true,
|
||||
query: { chat_id: chatId },
|
||||
});
|
||||
}
|
||||
|
||||
export function getStorageFiles(
|
||||
group: StorageGroupName | null,
|
||||
page: Page = {}
|
||||
page: Page = {},
|
||||
chatId: number | null = null
|
||||
): Promise<StorageFile[]> {
|
||||
return request<StorageFile[]>("/storage/files", {
|
||||
account: true,
|
||||
query: { chat_id: chatId, group, ...page },
|
||||
});
|
||||
}
|
||||
|
||||
export function getStorageChats(
|
||||
group: StorageGroupName | null,
|
||||
page: Page = {}
|
||||
): Promise<StorageChat[]> {
|
||||
return request<StorageChat[]>("/storage/chats", {
|
||||
account: true,
|
||||
query: { group, ...page },
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user