There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
feat: remove avatar for empty field (#8246)
darkskygitfc7e7a37ee4c
diff --git a/packages/frontend/core/src/components/affine/page-properties/property-row-value-renderer.tsx b/packages/frontend/core/src/components/affine/page-properties/property-row-value-renderer.tsxindex 8be342b0cc..94dc784dea 100644--- a/packages/frontend/core/src/components/affine/page-properties/property-row-value-renderer.tsx+++ b/packages/frontend/core/src/components/affine/page-properties/property-row-value-renderer.tsx@@ -232,8 +232,6 @@ const CloudUserAvatar = (props: { type: 'CreatedBy' | 'UpdatedBy' }) => {return null;}, [cloudDocMeta, props.type]);- const t = useI18n();-if (!cloudDocMeta) {if (isRevalidating) {// TODO: loading ui@@ -253,32 +251,34 @@ const CloudUserAvatar = (props: { type: 'CreatedBy' | 'UpdatedBy' }) => {</>);}- return (- <>- <Avatar name="?" size={20} />- <span>- {t['com.affine.page-properties.property-user-avatar-no-record']()}- </span>- </>- );+ return <NoRecordValue />;};-export const LocalUserValue = () => {+const NoRecordValue = () => {const t = useI18n();return (- <span className={styles.propertyRowValueCell}>- {t['com.affine.page-properties.local-user']()}+ <span>+ {t['com.affine.page-properties.property-user-avatar-no-record']()}</span>);};+const LocalUserValue = () => {+ const t = useI18n();+ return <span>{t['com.affine.page-properties.local-user']()}</span>;+};+export const CreatedUserValue = () => {const workspaceService = useService(WorkspaceService);const isCloud =workspaceService.workspace.flavour === WorkspaceFlavour.AFFINE_CLOUD;if (!isCloud) {- return <LocalUserValue />;+ return (+ <div className={styles.propertyRowValueUserCell}>+ <LocalUserValue />+ </div>+ );}return (