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 { WorkbenchLink } from '@affine/core/modules/workbench';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import {
|
import {
|
||||||
|
DeleteIcon,
|
||||||
LinkedEdgelessIcon,
|
LinkedEdgelessIcon,
|
||||||
LinkedPageIcon,
|
LinkedPageIcon,
|
||||||
TodayIcon,
|
TodayIcon,
|
||||||
@@ -43,12 +44,15 @@ export function pageReferenceRenderer({
|
|||||||
const referencedPage = pageMetaHelper.getDocMeta(pageId);
|
const referencedPage = pageMetaHelper.getDocMeta(pageId);
|
||||||
let title =
|
let title =
|
||||||
referencedPage?.title ?? t['com.affine.editor.reference-not-found']();
|
referencedPage?.title ?? t['com.affine.editor.reference-not-found']();
|
||||||
let icon =
|
|
||||||
docMode === 'page' || docMode === null ? (
|
let icon = !referencedPage ? (
|
||||||
|
<DeleteIcon className={styles.pageReferenceIcon} />
|
||||||
|
) : docMode === 'page' || docMode === null ? (
|
||||||
<LinkedPageIcon className={styles.pageReferenceIcon} />
|
<LinkedPageIcon className={styles.pageReferenceIcon} />
|
||||||
) : (
|
) : (
|
||||||
<LinkedEdgelessIcon className={styles.pageReferenceIcon} />
|
<LinkedEdgelessIcon className={styles.pageReferenceIcon} />
|
||||||
);
|
);
|
||||||
|
|
||||||
const isJournal = isPageJournal(pageId);
|
const isJournal = isPageJournal(pageId);
|
||||||
const localizedJournalDate = getLocalizedJournalDateString(pageId);
|
const localizedJournalDate = getLocalizedJournalDateString(pageId);
|
||||||
if (isJournal && localizedJournalDate) {
|
if (isJournal && localizedJournalDate) {
|
||||||
|
|||||||
Reference in New Issue
Block a user