fix(core): unable to hide doc info (#8658)

close AF-1577 AF-1576
This commit is contained in:
JimmFly
2024-11-01 06:47:58 +00:00
parent c915a3bcb5
commit 1c22fdd371
2 changed files with 7 additions and 1 deletions

View File

@@ -247,6 +247,10 @@ export const BlocksuiteDocEditor = forwardRef<
)
);
const displayDocInfo = useLiveData(
editorSettingService.editorSetting.settings$.selector(s => s.displayDocInfo)
);
return (
<>
<div className={styles.affineDocViewport} style={{ height: '100%' }}>
@@ -255,7 +259,7 @@ export const BlocksuiteDocEditor = forwardRef<
) : (
<BlocksuiteEditorJournalDocTitle page={page} />
)}
{!shared ? (
{!shared && displayDocInfo ? (
<DocPropertiesTable defaultOpenProperty={defaultOpenProperty} />
) : null}
<adapted.DocEditor

View File

@@ -10,6 +10,7 @@ export const root = style({
width: '100%',
justifyContent: 'center',
fontFamily: cssVar('fontSansFamily'),
paddingBottom: '18px',
vars: {
[propertyNameCellWidth]: '160px',
[fontSize]: cssVar('fontSm'),
@@ -41,6 +42,7 @@ export const tableHeader = style({
display: 'flex',
height: 30,
padding: 4,
marginBottom: '8px',
justifyContent: 'space-between',
alignItems: 'center',
color: cssVarV2('text/secondary'),