Skip to content

Commit

Permalink
fix: optimize block template description (#4721)
Browse files Browse the repository at this point in the history
* fix: optimize block template description

* fix: optimize block template description

* fix: bug
  • Loading branch information
Katherine committed Jun 21, 2024
1 parent 8725492 commit fb1ed31
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const ActionBar = withDynamicSchemaProps(
<Portal>
<DndContext>
<div
style={{ display: 'flex', alignItems: 'center', gap: 8, ...style }}
style={{ display: 'flex', alignItems: 'center', gap: 8, ...style, marginTop: token.marginLG }}
{...others}
className={cx(others.className, 'nb-action-bar')}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ const InternalSchemaToolbar: FC<SchemaToolbarProps> = (props) => {
const { designable } = useDesignable();
const compile = useCompile();
const { styles } = useStyles();
const { t } = useTranslation();
const { getAriaLabel } = useGetAriaLabelOfDesigner();
const dm = useDataSourceManager();
const dataSources = dm?.getDataSources();
Expand Down Expand Up @@ -321,11 +322,14 @@ const InternalSchemaToolbar: FC<SchemaToolbarProps> = (props) => {
{titleArr && (
<div className={styles.toolbarTitle}>
<Space size={2}>
{titleArr.map((item) => (
<span key={item} className={styles.toolbarTitleTag}>
{dataSource ? `${compile(dataSource?.displayName)} > ${item}` : item}
<span key={titleArr[0]} className={styles.toolbarTitleTag}>
{dataSource ? `${compile(dataSource?.displayName)} > ${titleArr[0]}` : titleArr[0]}
</span>
{titleArr[1] && (
<span className={styles.toolbarTitleTag}>
{`${t('Reference template')}: ${`${titleArr[1]}` || t('Untitled')}`}
</span>
))}
)}
</Space>
</div>
)}
Expand Down

0 comments on commit fb1ed31

Please sign in to comment.