mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 05:13:32 +00:00
refactor: project info design review
This commit is contained in:
committed by
Carlos Valente
parent
8adca908b3
commit
9167a50eda
@@ -5,6 +5,7 @@ import EmptyPage from '../../common/components/state/EmptyPage';
|
||||
import ViewLogo from '../../common/components/view-logo/ViewLogo';
|
||||
import ViewParamsEditor from '../../common/components/view-params-editor/ViewParamsEditor';
|
||||
import { useWindowTitle } from '../../common/hooks/useWindowTitle';
|
||||
import { useTranslation } from '../../translation/TranslationProvider';
|
||||
|
||||
import BackstageInfo from './backstage-info/BackstageInfo';
|
||||
import PublicInfo from './public-info/PublicInfo';
|
||||
@@ -19,18 +20,19 @@ interface ProjectInfoProps {
|
||||
|
||||
export default function ProjectInfo(props: ProjectInfoProps) {
|
||||
const { general, isMirrored } = props;
|
||||
const { getLocalizedString } = useTranslation();
|
||||
|
||||
useWindowTitle('Project info');
|
||||
|
||||
if (!general) {
|
||||
return <Empty text='No data found' />;
|
||||
return <Empty text={getLocalizedString('common.no_data')} />;
|
||||
}
|
||||
|
||||
if (!general) {
|
||||
return (
|
||||
<>
|
||||
<ViewParamsEditor viewOptions={projectInfoOptions} />
|
||||
return <EmptyPage text='No data found' />;
|
||||
<EmptyPage text={getLocalizedString('common.no_data')} />;
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -40,7 +42,7 @@ export default function ProjectInfo(props: ProjectInfoProps) {
|
||||
return (
|
||||
<>
|
||||
<ViewParamsEditor viewOptions={projectInfoOptions} />
|
||||
<EmptyPage text='The project has no data yet' />;
|
||||
<EmptyPage text={getLocalizedString('common.no_data')} />;
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -52,13 +54,13 @@ export default function ProjectInfo(props: ProjectInfoProps) {
|
||||
<div className='info'>
|
||||
{general.title && (
|
||||
<>
|
||||
<div className='info__label'>Title</div>
|
||||
<div className='info__label'>{getLocalizedString('project.title')}</div>
|
||||
<div className='info__value'>{general.title}</div>
|
||||
</>
|
||||
)}
|
||||
{general.description && (
|
||||
<>
|
||||
<div className='info__label'>Description</div>
|
||||
<div className='info__label'>{getLocalizedString('project.description')}</div>
|
||||
<div className='info__value'>{general.description}</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user