mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-02-04 16:16:55 +00:00
파일 페이지에서의 네트워크 호출 최적화
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
import { writable, type Writable } from "svelte/store";
|
||||
|
||||
export interface FileDownloadStatus {
|
||||
id: number;
|
||||
status:
|
||||
| "download-pending"
|
||||
| "downloading"
|
||||
| "decryption-pending"
|
||||
| "decrypting"
|
||||
| "decrypted"
|
||||
| "canceled"
|
||||
| "error";
|
||||
progress?: number;
|
||||
rate?: number;
|
||||
estimated?: number;
|
||||
result?: ArrayBuffer;
|
||||
}
|
||||
|
||||
export const fileDownloadStatusStore = writable<Writable<FileDownloadStatus>[]>([]);
|
||||
|
||||
export const isFileDownloading = (
|
||||
status: FileDownloadStatus["status"],
|
||||
): status is "download-pending" | "downloading" | "decryption-pending" | "decrypting" => {
|
||||
return ["download-pending", "downloading", "decryption-pending", "decrypting"].includes(status);
|
||||
};
|
||||
@@ -1,2 +1 @@
|
||||
export * from "./file";
|
||||
export * from "./key";
|
||||
|
||||
Reference in New Issue
Block a user