Rework userFileStore (#815)

* Rework userFileStore

* nit

* Add back unittests
This commit is contained in:
Chenlei Hu
2024-09-13 17:40:08 +09:00
committed by GitHub
parent 65a8dbb7e0
commit 17db1e6074
4 changed files with 259 additions and 288 deletions

View File

@@ -415,7 +415,11 @@ const zUser = z.object({
users: z.record(z.string(), z.unknown())
})
const zUserData = z.array(z.array(z.string(), z.string()))
const zUserDataFullInfo = z.object({
path: z.string(),
size: z.number(),
modified: z.number()
})
const zBookmarkCustomization = z.object({
icon: z.string().optional(),
color: z.string().optional()
@@ -506,3 +510,4 @@ export type DeviceStats = z.infer<typeof zDeviceStats>
export type SystemStats = z.infer<typeof zSystemStats>
export type User = z.infer<typeof zUser>
export type UserData = z.infer<typeof zUserData>
export type UserDataFullInfo = z.infer<typeof zUserDataFullInfo>