Skip to content

Commit

Permalink
fix(core): unable to hide doc info (toeverything#8658)
Browse files Browse the repository at this point in the history
close AF-1577 AF-1576
  • Loading branch information
JimmFly committed Nov 1, 2024
1 parent c915a3b commit 1c22fdd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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%' }}>
Expand All @@ -255,7 +259,7 @@ export const BlocksuiteDocEditor = forwardRef<
) : (
<BlocksuiteEditorJournalDocTitle page={page} />
)}
{!shared ? (
{!shared && displayDocInfo ? (
<DocPropertiesTable defaultOpenProperty={defaultOpenProperty} />
) : null}
<adapted.DocEditor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const root = style({
width: '100%',
justifyContent: 'center',
fontFamily: cssVar('fontSansFamily'),
paddingBottom: '18px',
vars: {
[propertyNameCellWidth]: '160px',
[fontSize]: cssVar('fontSm'),
Expand Down Expand Up @@ -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'),
Expand Down

0 comments on commit 1c22fdd

Please sign in to comment.