Improve the journal's look.

master
Tom Hacohen 7 years ago
parent 56947722d3
commit 63a1b0286b

@ -3,6 +3,8 @@ import { Tabs, Tab } from 'material-ui/Tabs';
import * as EteSync from './api/EteSync';
import Container from './Container';
import JournalEntries from './JournalEntries';
import JournalAddressBook from './JournalAddressBook';
import JournalCalendar from './JournalCalendar';
@ -10,6 +12,8 @@ import LoadingIndicator from './LoadingIndicator';
import { syncEntriesToItemMap, syncEntriesToCalendarItemMap } from './journal-processors';
import { getPalette } from './App';
import { JournalsData, EntriesType, CredentialsData } from './store';
interface PropsType {
@ -72,21 +76,42 @@ class Journal extends React.Component {
itemsTitle = 'Items';
}
const style = {
header: {
backgroundColor: getPalette('primary1Color'),
color: getPalette('alternateTextColor'),
padding: 15,
textAlign: 'center',
},
headerText: {
margin: 0,
},
};
return (
<React.Fragment>
<div style={style.header}>
<Container>
<h2 style={style.headerText}>{collectionInfo.displayName}</h2>
</Container>
</div>
<Tabs>
<Tab
label={itemsTitle}
>
<h2>{collectionInfo.displayName}</h2>
<Container>
{itemsView}
</Container>
</Tab>
<Tab
label="Journal Entries"
>
<h2>{collectionInfo.displayName}</h2>
<Container>
<JournalEntries journal={journal} entries={syncEntries} />;
</Container>
</Tab>
</Tabs>
</React.Fragment>
);
}
}

@ -48,12 +48,9 @@ class JournalCalendar extends React.Component {
<Route
path={routeResolver.getRoute('journals._id.items._id')}
exact={true}
render={({match}) => {
return (
render={({match}) => (
<Event event={items.get(match.params.itemUid)} />
);
}}
)}
/>
</Switch>
);

Loading…
Cancel
Save