mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-08 20:57:08 +08:00
fix(core): improve doc title and icon display (#9755)
Closes: [AF-2132](https://linear.app/affine-design/issue/AF-2132/优化-emoji-title-和-icon-显示)
This commit is contained in:
@@ -55,8 +55,7 @@ const ConflictItem = ({ docRecord }: { docRecord: DocRecord }) => {
|
||||
const docId = docRecord.id;
|
||||
const i18n = useI18n();
|
||||
const docDisplayMetaService = useService(DocDisplayMetaService);
|
||||
const titleMeta = useLiveData(docDisplayMetaService.title$(docId));
|
||||
const title = i18n.t(titleMeta);
|
||||
const title = useLiveData(docDisplayMetaService.title$(docId));
|
||||
|
||||
return (
|
||||
<WorkbenchLink className={styles.docItem} to={`/${docId}`}>
|
||||
|
||||
@@ -84,8 +84,7 @@ const DocItem = ({ docRecord }: { docRecord: DocRecord }) => {
|
||||
const Icon = useLiveData(
|
||||
docDisplayMetaService.icon$(docId, { compareDate: new Date() })
|
||||
);
|
||||
const titleMeta = useLiveData(docDisplayMetaService.title$(docId));
|
||||
const title = i18n.t(titleMeta);
|
||||
const title = useLiveData(docDisplayMetaService.title$(docId));
|
||||
return (
|
||||
<WorkbenchLink aria-label={title} to={`/${docId}`}>
|
||||
<MobileMenuItem
|
||||
|
||||
+1
-3
@@ -23,13 +23,11 @@ interface JournalTodayActivityMenuItemProps {
|
||||
type Category = 'created' | 'updated';
|
||||
|
||||
const DocItem = ({ docId }: { docId: string }) => {
|
||||
const i18n = useI18n();
|
||||
const docDisplayMetaService = useService(DocDisplayMetaService);
|
||||
const Icon = useLiveData(
|
||||
docDisplayMetaService.icon$(docId, { compareDate: new Date() })
|
||||
);
|
||||
const titleMeta = useLiveData(docDisplayMetaService.title$(docId));
|
||||
const title = i18n.t(titleMeta);
|
||||
const title = useLiveData(docDisplayMetaService.title$(docId));
|
||||
return (
|
||||
<WorkbenchLink aria-label={title} to={`/${docId}`}>
|
||||
<MenuItem prefixIcon={<Icon />}>{title}</MenuItem>
|
||||
|
||||
Reference in New Issue
Block a user