mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
chore(core): update inline reference icon (#7340)
Close [BS-659](https://linear.app/affine-design/issue/BS-659/deleted-doc%E7%8A%B6%E6%80%81%E7%BC%BA%E5%A4%B1) Related PR: https://github.com/toeverything/blocksuite/pull/7433 Before:  After: 
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
import { WorkbenchLink } from '@affine/core/modules/workbench';
|
||||
import { useI18n } from '@affine/i18n';
|
||||
import {
|
||||
DeleteIcon,
|
||||
LinkedEdgelessIcon,
|
||||
LinkedPageIcon,
|
||||
TodayIcon,
|
||||
@@ -43,12 +44,15 @@ export function pageReferenceRenderer({
|
||||
const referencedPage = pageMetaHelper.getDocMeta(pageId);
|
||||
let title =
|
||||
referencedPage?.title ?? t['com.affine.editor.reference-not-found']();
|
||||
let icon =
|
||||
docMode === 'page' || docMode === null ? (
|
||||
<LinkedPageIcon className={styles.pageReferenceIcon} />
|
||||
) : (
|
||||
<LinkedEdgelessIcon className={styles.pageReferenceIcon} />
|
||||
);
|
||||
|
||||
let icon = !referencedPage ? (
|
||||
<DeleteIcon className={styles.pageReferenceIcon} />
|
||||
) : docMode === 'page' || docMode === null ? (
|
||||
<LinkedPageIcon className={styles.pageReferenceIcon} />
|
||||
) : (
|
||||
<LinkedEdgelessIcon className={styles.pageReferenceIcon} />
|
||||
);
|
||||
|
||||
const isJournal = isPageJournal(pageId);
|
||||
const localizedJournalDate = getLocalizedJournalDateString(pageId);
|
||||
if (isJournal && localizedJournalDate) {
|
||||
|
||||
Reference in New Issue
Block a user