mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
refactor(core): refactor tag to use di (#6079)
use case ``` const tagService = useService(TagService); const tags = useLiveData(tagService.tags); const currentTagLiveData = tagService.tagByTagId(tagId); const currentTag = useLiveData(currentTagLiveData); ```
This commit is contained in:
4
packages/common/env/src/filter.ts
vendored
4
packages/common/env/src/filter.ts
vendored
@@ -53,6 +53,8 @@ export const collectionSchema = z.object({
|
||||
name: z.string(),
|
||||
filterList: z.array(filterSchema),
|
||||
allowList: z.array(z.string()),
|
||||
createDate: z.union([z.date(), z.number()]).optional(),
|
||||
updateDate: z.union([z.date(), z.number()]).optional(),
|
||||
});
|
||||
export const deletedCollectionSchema = z.object({
|
||||
userId: z.string().optional(),
|
||||
@@ -78,6 +80,8 @@ export const tagSchema = z.object({
|
||||
value: z.string(),
|
||||
color: z.string(),
|
||||
parentId: z.string().optional(),
|
||||
createDate: z.union([z.date(), z.number()]).optional(),
|
||||
updateDate: z.union([z.date(), z.number()]).optional(),
|
||||
});
|
||||
export type Tag = z.input<typeof tagSchema>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user