diff --git a/src/JournalViewEntries.tsx b/src/JournalViewEntries.tsx index 656d34f..e4bfe42 100644 --- a/src/JournalViewEntries.tsx +++ b/src/JournalViewEntries.tsx @@ -1,4 +1,8 @@ import * as React from 'react'; +import { List, ListItem } from 'material-ui/List'; +import IconAdd from 'material-ui/svg-icons/content/add'; +import IconDelete from 'material-ui/svg-icons/action/delete'; +import IconEdit from 'material-ui/svg-icons/editor/mode-edit'; import * as ICAL from 'ical.js'; @@ -22,24 +26,53 @@ export class JournalViewEntries extends React.Component { const entries = this.props.entries.map((syncEntry, idx) => { const comp = new ICAL.Component(ICAL.parse(syncEntry.content)); + let icon; + if (syncEntry.action === EteSync.SyncEntryAction.Add) { + icon = (); + } else if (syncEntry.action === EteSync.SyncEntryAction.Change) { + icon = (); + } else if (syncEntry.action === EteSync.SyncEntryAction.Delete) { + icon = (); + } + if (comp.name === 'vcalendar') { const vevent = new ICAL.Event(comp.getFirstSubcomponent('vevent')); - return (
  • {syncEntry.action}: {vevent.summary} ({vevent.uid})
  • ); + return ( + + ); } else if (comp.name === 'vcard') { const vcard = comp; const name = vcard.getFirstPropertyValue('fn'); const uid = vcard.getFirstPropertyValue('uid'); - return (
  • {syncEntry.action}: {name} ({uid})
  • ); + return ( + + ); } else { - return (
  • {syncEntry.action}: {syncEntry.content}
  • ); + return ( + + ); } }).reverse(); return (
    -
      + {entries} -
    +
    ); }