Journals list+import: move journal items to the left side.

master
Tom Hacohen 5 years ago
parent e0e805d009
commit 69c38d7e8f

@ -54,7 +54,7 @@ export default function JournalsList(props: PropsType) {
} }
ret[info.type] = ret[info.type] || []; ret[info.type] = ret[info.type] || [];
ret[info.type].push( ret[info.type].push(
<ListItem key={journal.uid} rightIcon={colorBox} <ListItem key={journal.uid} rightIcon={colorBox} insetChildren
onClick={() => journalClicked(journal.uid)}> onClick={() => journalClicked(journal.uid)}>
{info.displayName} ({journal.uid.slice(0, 5)}) {info.displayName} ({journal.uid.slice(0, 5)})
</ListItem> </ListItem>
@ -82,19 +82,19 @@ export default function JournalsList(props: PropsType) {
<List> <List>
<ListItem <ListItem
primaryText="Address Books" primaryText="Address Books"
rightIcon={<ContactsIcon />} leftIcon={<ContactsIcon />}
nestedItems={journalMap.ADDRESS_BOOK} nestedItems={journalMap.ADDRESS_BOOK}
/> />
<ListItem <ListItem
primaryText="Calendars" primaryText="Calendars"
rightIcon={<CalendarTodayIcon />} leftIcon={<CalendarTodayIcon />}
nestedItems={journalMap.CALENDAR} nestedItems={journalMap.CALENDAR}
/> />
<ListItem <ListItem
primaryText="Tasks" primaryText="Tasks"
rightIcon={<FormatListBulletedIcon />} leftIcon={<FormatListBulletedIcon />}
nestedItems={journalMap.TASKS} nestedItems={journalMap.TASKS}
/> />
</List> </List>

@ -3,6 +3,10 @@
import * as React from 'react'; import * as React from 'react';
import ContactsIcon from '@material-ui/icons/Contacts';
import CalendarTodayIcon from '@material-ui/icons/CalendarToday';
import FormatListBulletedIcon from '@material-ui/icons/FormatListBulleted';
import { List, ListItem } from '../widgets/List'; import { List, ListItem } from '../widgets/List';
import AppBarOverride from '../widgets/AppBarOverride'; import AppBarOverride from '../widgets/AppBarOverride';
@ -42,7 +46,7 @@ export default function JournalsList(props: PropsType) {
} }
ret[info.type] = ret[info.type] || []; ret[info.type] = ret[info.type] || [];
ret[info.type].push( ret[info.type].push(
<ListItem key={journal.uid} rightIcon={colorBox} <ListItem key={journal.uid} rightIcon={colorBox} insetChildren
onClick={() => setSelectedJournal(props.syncInfo.get(journal.uid))}> onClick={() => setSelectedJournal(props.syncInfo.get(journal.uid))}>
{info.displayName} ({journal.uid.slice(0, 5)}) {info.displayName} ({journal.uid.slice(0, 5)})
</ListItem> </ListItem>
@ -62,16 +66,19 @@ export default function JournalsList(props: PropsType) {
<List> <List>
<ListItem <ListItem
primaryText="Address Books" primaryText="Address Books"
leftIcon={<ContactsIcon />}
nestedItems={journalMap.ADDRESS_BOOK} nestedItems={journalMap.ADDRESS_BOOK}
/> />
<ListItem <ListItem
primaryText="Calendars" primaryText="Calendars"
leftIcon={<CalendarTodayIcon />}
nestedItems={journalMap.CALENDAR} nestedItems={journalMap.CALENDAR}
/> />
<ListItem <ListItem
primaryText="Tasks" primaryText="Tasks"
leftIcon={<FormatListBulletedIcon />}
nestedItems={journalMap.TASKS} nestedItems={journalMap.TASKS}
/> />
</List> </List>

Loading…
Cancel
Save