mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-16 06:58:46 +00:00
파일 페이지에 카테고리 목록 및 카테고리에 추가 버튼 구현
This commit is contained in:
@@ -46,6 +46,7 @@ export interface FileInfo {
|
||||
name: string;
|
||||
createdAt?: Date;
|
||||
lastModifiedAt: Date;
|
||||
categoryIds: number[];
|
||||
}
|
||||
|
||||
type CategoryId = "root" | number;
|
||||
@@ -160,7 +161,7 @@ const fetchFileInfoFromIndexedDB = async (id: number, info: Writable<FileInfo |
|
||||
const file = await getFileInfoFromIndexedDB(id);
|
||||
if (!file) return;
|
||||
|
||||
info.set(file);
|
||||
info.set({ ...file, categoryIds: [] });
|
||||
};
|
||||
|
||||
const decryptDate = async (ciphertext: string, iv: string, dataKey: CryptoKey) => {
|
||||
@@ -204,6 +205,7 @@ const fetchFileInfoFromServer = async (
|
||||
name,
|
||||
createdAt,
|
||||
lastModifiedAt,
|
||||
categoryIds: metadata.categories,
|
||||
});
|
||||
await storeFileInfo({
|
||||
id,
|
||||
|
||||
Reference in New Issue
Block a user