Skip to content

Commit

Permalink
added translations to tabs, removed margin-bottom from tabbar
Browse files Browse the repository at this point in the history
  • Loading branch information
Corepex committed Feb 23, 2024
1 parent 10a3f39 commit edc73b8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
3 changes: 3 additions & 0 deletions assets/js/src/components/editor-tabs/editor-tabs.styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export const useStyle = createStyles(({ token, css }) => {
&.ant-tabs .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {
color: ${token.colorPrimaryActive}
}
&.ant-tabs-top >.ant-tabs-nav {
margin-bottom: 0;
}
.ant-tabs-tab {
&:first-of-type {
Expand Down
23 changes: 12 additions & 11 deletions assets/js/src/modules/asset/editor-tabs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,75 +11,76 @@ import { NotesAndEventsTab } from '@Pimcore/modules/asset/editor-tabs/tabs/conta
import { WorkflowTab } from '@Pimcore/modules/asset/editor-tabs/tabs/container/workflow'
import { TagsTab } from '@Pimcore/modules/asset/editor-tabs/tabs/container/tags'
import { AssetEditorTabManager } from '@Pimcore/modules/editor-tab-manager/utils/asset-tab-manager'
import i18n from '@Pimcore/app/i18n'

export const assetEditorTabManager = new AssetEditorTabManager()

assetEditorTabManager.register({
key: 'view',
label: ('view'),
label: i18n.t('asset.asset-editor-tabs.view'),
children: <ViewTab />,
icon: <Icon name={'image-05'} />
})

assetEditorTabManager.register({
key: 'edit',
label: ('edit'),
label: i18n.t('asset.asset-editor-tabs.edit'),
children: <EditTab />,
icon: <Icon name={'edit'} />
})

assetEditorTabManager.register({
key: 'embedded-metadata',
label: ('embedded metadata'),
label: i18n.t('asset.asset-editor-tabs.embedded-metadata'),
children: <EmbeddedMetadataTab />,
icon: <Icon name={'data-sheet'} />
})

assetEditorTabManager.register({
key: 'custom-metadata',
label: ('custom metadata'),
label: i18n.t('asset.asset-editor-tabs.custom-metadata'),
children: <CustomMetadataTab />,
icon: <Icon name={'data-management-2'} />
})

assetEditorTabManager.register({
key: 'versions',
label: ('versions'),
label: i18n.t('asset.asset-editor-tabs.versions'),
children: <VersionsTab />,
icon: <Icon name={'history-outlined'} />
})

assetEditorTabManager.register({
key: 'schedule',
label: ('schedule'),
label: i18n.t('asset.asset-editor-tabs.schedule'),
children: <ScheduleTab />,
icon: <Icon name={'schedule-outlined'} />
})

assetEditorTabManager.register({
key: 'dependencies',
label: ('dependencies'),
label: i18n.t('asset.asset-editor-tabs.dependencies'),
children: <DependenciesTab />,
icon: <Icon name={'hierarchy'} />
})

assetEditorTabManager.register({
key: 'notes-and-events',
label: ('notes & events'),
key: 'notes-events',
label: i18n.t('asset.asset-editor-tabs.notes-events'),
children: <NotesAndEventsTab />,
icon: <Icon name={'view-details'} />
})

assetEditorTabManager.register({
key: 'tags',
label: ('tag'),
label: i18n.t('asset.asset-editor-tabs.tag'),
children: <TagsTab />,
icon: <Icon name={'tag-two-tone'} />
})

assetEditorTabManager.register({
key: 'workflow',
label: ('workflow'),
label: i18n.t('asset.asset-editor-tabs.workflow'),
children: <WorkflowTab />,
icon: <Icon name={'workflow'} />
})

0 comments on commit edc73b8

Please sign in to comment.