feat(core): emoji as doc icon support with feature flag (#8348)

close AF-1412

Adjusted the priority of the public doc icon:

1. block-reference
2. journal
3. page reference
4. **emoji** (*new)
5. default
This commit is contained in:
CatsJuice
2024-10-10 04:14:31 +00:00
parent 6e9db761a4
commit 17fec8928f
6 changed files with 96 additions and 21 deletions
@@ -52,7 +52,9 @@ export function AffinePageReference({
referenceToNode: linkToNode,
})
);
const title = useLiveData(docDisplayMetaService.title$(pageId));
const title = useLiveData(
docDisplayMetaService.title$(pageId, { reference: true })
);
const el = (
<>
@@ -34,7 +34,9 @@ export function createLinkedWidgetConfig(
return !meta.trash;
})
.map(meta => {
const title = docDisplayMetaService.title$(meta.id).value;
const title = docDisplayMetaService.title$(meta.id, {
reference: true,
}).value;
return {
...meta,
title: typeof title === 'string' ? title : I18n[title.key](),