434 Commits (c7d4a15f5fe716d4576d5ebe26688f3f3f1fed91)

Author SHA1 Message Date
Tom Hacohen 4833a98763 Split fetching credentials and key derivation. 7 years ago
Tom Hacohen b769c18021 Show a shorter login form (only enc password) if already logged in.
This is extremely useful for iOS devices where a PWA's session storage
is deleted every time it's minimised, and it's also useful for people
having multiple tabs open.
7 years ago
Tom Hacohen 2608a354ea Add an action to derive the encryption key. 7 years ago
Tom Hacohen 232ea823d0 LoinGate: rename the incorrectly named class name. 7 years ago
Tom Hacohen 8d3a06cdfd Split the login credentials and the encryption key.
We do this so we can persist the login info to local storage, but
still keep the encryption key safe.

This version will fails if you clear the session storage. This will be
fixed in the next commit.
7 years ago
Tom Hacohen c7e508b890 Also disable back when we have no history stack.
This is useful for when we open a page directly in an inner link.
7 years ago
Tom Hacohen 50af0ac0d1 Container: fix marging to be padding so size is correct. 7 years ago
Tom Hacohen a464f019aa Fix the elastic white area on iOS and change bar to translucent. 7 years ago
Tom Hacohen 2d76164666 Fix the back button to work on first load too. 7 years ago
Tom Hacohen 054caaa56f Change the menu button to a back button on the main page. 7 years ago
Tom Hacohen f74ec6f05a Merge JournalAddressbook and JournalCalendar. 7 years ago
Tom Hacohen a32002eabd Replace the a tag with an ExternalLink component.
This lets us handle behaviour more consistently, for example by opening
external links in a new tab.
7 years ago
Tom Hacohen ec8a1d9017 Fix react-router related types. 7 years ago
Tom Hacohen 06887c58c3 Fix event types. 7 years ago
Tom Hacohen e48ebc5137 Fix entries fetching by creating a fetchAll action. 7 years ago
Tom Hacohen e38409203c Remove fetching status from the store.
This was causing constant invalidations and therefore killing our performance.
7 years ago
Tom Hacohen e58ddf8545 Implement shallow compare for the journal reducer.
The reason why we need it is that we don't have a concept of etag for
journal fetching, which means we were setting the store on each fetch
causing everything that depends on the journals to invalidate.

This triggers a bug that causes the entries not to refresh if the
journals haven't changed.
7 years ago
Tom Hacohen 2aa92f15e7 Reducer: don't reset the store when fetching.
There were a couple of bugs there:
1. The store was reset while fetching/error because the payload was
empty/error.
2. The error status wasn't reset after for successful fetches that
follow failed ones.
7 years ago
Tom Hacohen b876a90a5a Fix the calendar component to avoid re-rendering. 7 years ago
Tom Hacohen 8186055537 Syncgate: don't create the router aware components on each render. 7 years ago
Tom Hacohen 4613a65365 Don't recreate the persistant calendar component on each render. 7 years ago
Tom Hacohen 331d85d3a2 history persistor: follow the recommended HOC guidelines. 7 years ago
Tom Hacohen 5a1b3af9b0 Calendar: fix the unnecessary recration of closures. 7 years ago
Tom Hacohen 0d6ecfdbdf Calendar: remove the unneccesary events sort. 7 years ago
Tom Hacohen e085c0c40a Side menu journals: don't trigger recalcs on route changes. 7 years ago
Tom Hacohen a77e9077bf Address book: make a component out of the list item. 7 years ago
Tom Hacohen cec318f41f Api: rename tsx files to ts. 7 years ago
Tom Hacohen 0ee6bbd340 Bring back list margin and remove the explicit contact padding 7 years ago
Tom Hacohen 98686f197a Move all of the side menu items to one place. 7 years ago
Tom Hacohen 1da58da23e Move all of the Pim related files to one dir. 7 years ago
Tom Hacohen 62dbc4b08d Move all of the Journal related files to one dir. 7 years ago
Tom Hacohen 441549f41d Move LoginForm to the component dir. 7 years ago
Tom Hacohen e710e89200 Remove server url awareness from LoginForm making it a cleaner component. 7 years ago
Tom Hacohen 9f5da61dfb Remove the hack we used for React.Fragment. 7 years ago
Tom Hacohen 6a586ac38f Rename the Root to LoginGate because that's all it does. 7 years ago
Tom Hacohen 5ee24d054d Move all of the view-only components to their own directory. 7 years ago
Tom Hacohen 85f5f91f36 Move the constants to their own module. 7 years ago
Tom Hacohen 4722207308 Change the suffix of helpers from .tsx to .ts.
They are not jsx files.
7 years ago
Tom Hacohen d06b7610cd Move the basic widgets to their own directory. 7 years ago
Tom Hacohen 9029d365bc Move types to their own directory. 7 years ago
Tom Hacohen 48cd22b464 Move the store into its own module and split it up. 7 years ago
Tom Hacohen e9db374206 Contact: fix virtual artefact with dividers. 7 years ago
Tom Hacohen b93049f7a0 List: filter some of the props. 7 years ago
Tom Hacohen b76ac00d78 Fix the ListDivider to be a list item. 7 years ago
Tom Hacohen 87e670ac97 Use the new MUI-like List API.
We had to change away from MUI because the list efficiency was abysmal.
Everything is an order of magnitude faster now.
7 years ago
Tom Hacohen fdaef3a9f7 Make our List widget more like the mui one. 7 years ago
Tom Hacohen 3bb6d92be7 Add very basic error handling. 7 years ago
Tom Hacohen 2f96977646 Store fetching: fix the return record to include the error and fetching status. 7 years ago
Tom Hacohen 7b7c96719d Optimise PIM page a bit more. 7 years ago
Tom Hacohen 95c8bff9be Cache the Pim related calculations.
No need to recalc everything if the input is the same.
7 years ago
Tom Hacohen 58eedd1c37 Cache the SyncGate calculations.
This was taking quite a lot of time and caching this significantly
improves performance.

We only need it because of the react-redux-router bug, but good to have
it in the meanwhile.
7 years ago
Tom Hacohen 360a6ad826 Create our own dedicated avatar widget. 7 years ago
Tom Hacohen 1a1bdc77af Add our own list widget.
The material ui one is extremely inefficient and was causing noticeable
delays.
7 years ago
Tom Hacohen 97eaa756fe Add FIXMEs for the withRouter workaround
Because of: https://github.com/ReactTraining/react-router/issues/5795
We have to use withRouter which triggers a lot of extra renderings.
This means that until the bug is fixed we have to use withRouter and
some memoization to make sure we don't recalc everything all the time.
7 years ago
Tom Hacohen 264145eb72 Pim: no longer pass the match object. 7 years ago
Tom Hacohen 9f396173b0 Move etsync decryption logic to sync gate.
This shares more of the code, and also lets us be more efficient because
we now do these calculations less.
7 years ago
Tom Hacohen 6c4f077d0f Add missing new for records. 7 years ago
Tom Hacohen 4f88ff6364 Adjust code to work with es5 as a target. 7 years ago
Tom Hacohen a6ad199023 Make all of the React.Components Pure. 7 years ago
Tom Hacohen c3e686002e Move the store to immutable.js
This significantly helps with reducing the number of copies we do,
because in most cases a refresh will not change a journal.
7 years ago
Tom Hacohen ce71c5422f Pim: cleanup the syncenttry and journals processing.. 7 years ago
Tom Hacohen cabd82b382 Journal: remove accidental ; in content. 7 years ago
Tom Hacohen ce2c89aa50 Login form: disallow connecting to HTTP addresses in production. 7 years ago
Tom Hacohen 3231131e7e Add basic validation for events. 7 years ago
Tom Hacohen f12bc374f4 ContactEdit: remove unset properties. 7 years ago
Tom Hacohen c51804d7fe Event and contact: update last modified. 7 years ago
Tom Hacohen de3f96a10d ContactEdit: add IMPP. 7 years ago
Tom Hacohen 29ffb5a74b Add a few more contact fields. 7 years ago
Tom Hacohen 1524600e4b In iCal, all day events are until the end date not including
Adjust accordingly, and add some basic validation.
7 years ago
Tom Hacohen 29ae3005ea EventEdit: don't discard fields we don't handle and add a note about it. 7 years ago
Tom Hacohen da935c0836 Fix editing events of a journal other than the default. 7 years ago
Tom Hacohen 6d4c9c01e0 Fix saving of contacts. 7 years ago
Tom Hacohen 8c3adcdc94 Don't save empty properties. 7 years ago
Tom Hacohen fec1edf711 Make contact view more ressilient. 7 years ago
Tom Hacohen cf396ff904 Add missing version properties. 7 years ago
Tom Hacohen a7eb74bee1 Cleanup ContactEdit a bit and add address support. 7 years ago
Tom Hacohen 574df977c2 Store: fix test. 7 years ago
Tom Hacohen b7a6e123cd Improve contact edit. 7 years ago
Tom Hacohen 46ecb57af8 Update icaljs definitions. 7 years ago
Tom Hacohen daf27ca517 ContactType: Add a way to clone. 7 years ago
Tom Hacohen 6d76559d08 Initial version of contact editing. 7 years ago
Tom Hacohen 9521e3dae3 Fix the journal action to be change when changing event. 7 years ago
Tom Hacohen 7e271b1542 Event edit: add info text for the journal selector. 7 years ago
Tom Hacohen cfd6db6fb5 Go back on successful save. 7 years ago
Tom Hacohen 0c9dfd7087 Add a way to edit events. 7 years ago
Tom Hacohen 81c3f4d27e Add a way to create new events. 7 years ago
Tom Hacohen e22b520b5a EteSync api: fill in the collection info's uid. 7 years ago
Tom Hacohen 29a608db79 Pim page: add a button for creating contacts and events. 7 years ago
Tom Hacohen 221bdd4716 Use the sjcl random number generator for encryption. 7 years ago
Tom Hacohen 2507dfd5b3 Fix issue with sync entry being set and get differently. 7 years ago
Tom Hacohen 9c8df0a854 Add an action to create entries and add some store tests. 7 years ago
Tom Hacohen 441560dc72 Add a way to get the ical representation to events. 7 years ago
Tom Hacohen df538c368a EventEdit: add uuid to events. 7 years ago
Tom Hacohen 2af9e41404 Fix indentation. 7 years ago
Tom Hacohen 82c5a70eaa Add a simple widget for editing events. 7 years ago
Tom Hacohen 72aad2d24c Add a basic datetime picker widget. 7 years ago
Tom Hacohen f3e82ee7e4 Improve ical definitions. 7 years ago
Tom Hacohen 0fb37c1132 Move the creating event from calendar to one place. 7 years ago
Tom Hacohen 03bbc7af17 Add paths for contact and calendar creation. 7 years ago
Tom Hacohen e124a163a3 Root: use the container component. 7 years ago
Tom Hacohen f84c3b58da Make it possible to pass style to the Container component. 7 years ago
Tom Hacohen a374766ab8 Add a link to the source code from the login page. 7 years ago
Tom Hacohen 0471f2424d Change the contact colour coding to be based on the uid. 7 years ago
Tom Hacohen 76dd2327cd Improve login page. 7 years ago
Tom Hacohen c73aabf0cc Fix agenda header formatting. 7 years ago
Tom Hacohen 86c5a822cb Fix setting calendar's locale. 7 years ago
Tom Hacohen f4d49488a9 Handle loading inside the login form itself. 7 years ago
Tom Hacohen 3794d6c05a Implement last modified for contacts. 7 years ago
Tom Hacohen 6de0534bf9 Also change the background colour in the view event page. 7 years ago
Tom Hacohen 64e13f4ec8 Add colour to events. 7 years ago
Tom Hacohen 802b994a6f Change how multiple calendars are merged together. 7 years ago
Tom Hacohen c945731d8a Stop using Map<>.
It looks like this is more trouble than its worth. Things are missing
and it's in general a pain to work with.
7 years ago
Tom Hacohen 70486e7da2 Improve address book look. 7 years ago
Tom Hacohen 539759dd32 Add anniversary to contact view. 7 years ago
Tom Hacohen b3420bbc24 Improve contact properties conversion. 7 years ago
Tom Hacohen 5f2d499cc1 Add address and birthday. 7 years ago
Tom Hacohen 1dfc60afab Add icon to impp. 7 years ago
Tom Hacohen 1e752ae022 Improve the look of events and contacts. 7 years ago
Tom Hacohen 34445be4b0 Improve container 7 years ago
Tom Hacohen bfd5ba5d27 Split secondary header to its own component. 7 years ago
Tom Hacohen f2dfae6d77 Slightly improve the look of the calendar page. 7 years ago
Tom Hacohen 7067824ccd Improve the look of the contact page. 7 years ago
Tom Hacohen 1987ea126d Use container all around to improve look. 7 years ago
Tom Hacohen 87a2493956 Fix crash on new devices. 7 years ago
Tom Hacohen 63a1b0286b Improve the journal's look. 7 years ago
Tom Hacohen 56947722d3 Add a container component (like bootstrap's).
Just meant to help with sizing.
7 years ago
Tom Hacohen 3cfdb07b6a Persist some component state on route changes. 7 years ago
Tom Hacohen 025bb57b35 Fix name of PimMain. 7 years ago
Tom Hacohen c9cc26cf84 Pim Main keep tabs in state. 7 years ago
Tom Hacohen d8a57b821b Replace the hash router with the normal one.
The reason we need that is because it's lacking compared to the
hash one which is considered legacy.
7 years ago
Tom Hacohen 864dad372f Make special types for events and calendars.
This will simplify extracting values and already removes some
redundancy.
7 years ago
Tom Hacohen eb2075d0ec Remove debug code. 7 years ago
Tom Hacohen bb61ef3935 Improve presentation of events. 7 years ago
Tom Hacohen d51dd7108b Fix app test. 7 years ago
Tom Hacohen 6d83124376 Make the contact component throw an error if contact is undefined. 7 years ago
Tom Hacohen 3883cbad1c Show a very basic event page when an event is clicked. 7 years ago
Tom Hacohen 9b96e37e44 Remove redundant div. 7 years ago
Tom Hacohen 62859c411e Fix naming of the contact component. 7 years ago
Tom Hacohen eaf7de1c47 Remove the react fragment hack. 7 years ago
Tom Hacohen 57d65bec0f Make tel and email linkable in the contact view. 7 years ago
Tom Hacohen 588bec69cc Clean up the sidemenu. 7 years ago
Tom Hacohen 25402639b6 Split off the pim view and implement viewing contacts. 7 years ago
Tom Hacohen 8e2a465120 Rename Main to Pim. 7 years ago
Tom Hacohen c10a4cc924 Move the main page under pim and redirect there. 7 years ago
Tom Hacohen 590e8c61a9 Route resolver: make _base optional. 7 years ago
Tom Hacohen 97dc449953 Remove unused functions. 7 years ago
Tom Hacohen 68377ec0ac Fix viewing journals. 7 years ago
Tom Hacohen e310584e26 Split away the main view from the sync gate. 7 years ago
Tom Hacohen 5dacc4c013 Use the last entry id when fetching entries from server. 7 years ago
Tom Hacohen 4e9317a1ae Remove redundant fetchJournals from sidebar. 7 years ago
Tom Hacohen 058bb6dca9 Persist cache in localforage 7 years ago
Tom Hacohen fc42566486 Cleanup the calendar and render in the main page. 7 years ago
Tom Hacohen 425923aa6a Get rid of the useless HOC. 7 years ago
Tom Hacohen e6778f5ace Make the sync gate render the complete address book. 7 years ago
Tom Hacohen 0a4b065c9c Rename etesynccontext to root. 7 years ago
Tom Hacohen 9f5dd4f5ae Remove journal list. 7 years ago
Tom Hacohen 596d414025 Make a higher order function that translates syncentries to an item map. 7 years ago
Tom Hacohen ca49fc9eb5 Split the addressbook view from the syncentry handling code. 7 years ago
Tom Hacohen cf19e003d1 Rename calendar and address book to have the jorunal prefix.
The reason for that is that they are tied to a journal.
7 years ago
Tom Hacohen 1663460bed Put the journals in the sidemenu. 7 years ago
Tom Hacohen 92b8189190 Add fragment type. 7 years ago
Tom Hacohen cb28259b24 List unsupported journals. 7 years ago
Tom Hacohen e17aaaf79d Simplify entries fetching reducer. 7 years ago
Tom Hacohen e1bd0891fe Rename some components to make more sense. 7 years ago
Tom Hacohen 134539a02b Contact: remove extraneous dividers (in some cases) 7 years ago
Tom Hacohen 4e3ddcb29b Move the location of the username in the appbar. 7 years ago
Tom Hacohen 529d96d026 JournalEntries: use the loading indicator. 7 years ago
Tom Hacohen 95724c08d8 Change JournalFetcher to be a container instead of a gate.
It now not only fetches the journals, but also holds all of the children
and passes them the journals.
7 years ago
Tom Hacohen 278ebacad1 Add a nicer loading indicator. 7 years ago
Tom Hacohen 3bb8b6f101 Split out the login form from the etesync context. 7 years ago
Tom Hacohen cd2a6caf52 JournalList: get rid of the extra div. 7 years ago
Tom Hacohen 123cf589dd Remove debug code. 7 years ago
Tom Hacohen 87d150554c Remove fragment from journal view. 7 years ago
Tom Hacohen afb940d51a Simplify fetchCount using combineActions. 7 years ago
Tom Hacohen 6566bc01df Disable logger middleware in production builds. 7 years ago
Tom Hacohen 22381a1f85 Move to redux-actions. 7 years ago
Tom Hacohen 7e1d1087b1 Move to (our modified) redux-promise to simplify actions. 7 years ago
Tom Hacohen 49b9469284 Remove the redundant EteSyncContextType interface. 7 years ago
Tom Hacohen c67ba9a233 Move actions to the store file and clean up imports. 7 years ago
Tom Hacohen 33b4cc083a Add a component that acts as a gate for journal fetching. 7 years ago
Tom Hacohen 2e4c6b11aa Move entry fetching to redux. 7 years ago
Tom Hacohen f36e099bb9 Change all of our components to export themselves as default. 7 years ago
Tom Hacohen 43127dc53f Put username on the upper right corner. 7 years ago
Tom Hacohen 38cb4170ed Remove redundant class. 7 years ago
Tom Hacohen e75d586c0f Move journal fetching to redux. 7 years ago
Tom Hacohen 57f89e3840 Store: make global fetch count tracking generic. 7 years ago
Tom Hacohen c6ec2bcaf1 Fix wrong type in store. 7 years ago
Tom Hacohen fb660fc54c Make request types generic. 7 years ago
Tom Hacohen 37aaebbbd8 Clear login form username and password on submission. 7 years ago
Tom Hacohen 3c3ffb15d3 Implement logout and workaround an issue with redux-persist not persisting.
For some reason it doesn't persist when credentials === undefined.
7 years ago
Tom Hacohen 94c6916447 Add a basic redux store. 7 years ago
Tom Hacohen 55f595d52a Start using react fragments. 7 years ago
Tom Hacohen 36cf88aaf2 Fix the main navigation link. 7 years ago
Tom Hacohen fe6490a098 Show raw journal items when clicked. 7 years ago
Tom Hacohen 00d8b43cc5 Login: change login form to be a controlled component.
I thought it would be easier to use an uncontrolled component, but
it fails when loading fails. The form just clears.

This fixes it.
7 years ago
Tom Hacohen df4ea83208 Don't change history when switching tabs. 7 years ago
Tom Hacohen b0741978d0 Journal list: improve look. 7 years ago
Tom Hacohen 1bf6314ac3 EteSync: fix the sync entry action constant for Delete. 7 years ago
Tom Hacohen 1a9202521d Add in-app navigation links. 7 years ago
Tom Hacohen 5b8c000d45 Don't recreate views when switching tabs. 7 years ago
Tom Hacohen 635a41d41f Add a calendar view. 7 years ago
Tom Hacohen 154beee6d1 Fix input types for the login page. 7 years ago
Tom Hacohen fddf39244d Add a contact page. 7 years ago
Tom Hacohen 2a6220e6d4 Make it possible to navigate between collection items and journal entries. 7 years ago
Tom Hacohen 6c96d7994f Improve the look of the journals page. 7 years ago
Tom Hacohen 336a07e065 Remove the old welcome to react header. 7 years ago
Tom Hacohen b668e6478a Organise calendars and address books in lists. 7 years ago
Tom Hacohen 3faa7b3ed6 Simplify calls to setState, apparently it already shallow merges. 7 years ago
Tom Hacohen f8ee484c3b Add some login form validation. 7 years ago
Tom Hacohen 516bdd2622 Improve log in look and feel. 7 years ago
Tom Hacohen 622805a5b6 Improve the look and feel of the login form. 7 years ago
Tom Hacohen ef92632885 Change to the production API and allow setting a custom server. 7 years ago
Tom Hacohen 0a05095da2 Home: redirect to the journals view. 7 years ago
Tom Hacohen d7c90ccb0a Move to material-ui. 7 years ago
Tom Hacohen 295867a439 Login form: add a missing prevent default. 7 years ago
Tom Hacohen 07c986b01d Add a very basic login page and cache the keys in session storage. 7 years ago
Tom Hacohen 2947607a45 Update type definitions for ICAL and fix type errors. 7 years ago
Tom Hacohen f5c31a3dbe Add views for actual collection items.
I.e calendar events and address book content.
7 years ago
Tom Hacohen 8c20687a72 Split away the journal list item view from the jorunal view. 7 years ago
Tom Hacohen e92a9c9961 Improve presentation of journal log. 7 years ago
Tom Hacohen 8087f2d3f4 Fix to previous commit: fix redirect to entries page. 7 years ago
Tom Hacohen d4c49c1f55 Load the actual journal from the journal page.
This fixes viewing journals with version != 1.
7 years ago
Tom Hacohen 25bf249d9f Improve journal page. 7 years ago
Tom Hacohen af921e1b28 Move the header back outside of the internal components. 7 years ago
Tom Hacohen 132f63e2a6 Move all of the etesync context to a separate place.
This means that encryption key derivation and token access
are not called as often.
7 years ago
Tom Hacohen 6f9c783159 Cleanup the route resolver a bit. 7 years ago
Tom Hacohen 7dd8248aab Added a hacky journal view.
A lot of code duplication.
7 years ago
Tom Hacohen 557e5ec0b4 Add basic routing. 7 years ago
Tom Hacohen b9798f1b13 Switch to the hash router for security.
This is needed to avoid accidentally leaking urls to the server.
7 years ago
Tom Hacohen bba3282def Add a basic journal list view. 7 years ago
Tom Hacohen 9fd1b31299 Fix journal not having version set.
This commit also cleans up the sharing between the json from the API and
the internal state of the object.
7 years ago
Tom Hacohen 11aa1ffd94 API: first verify, then try to decrypt! 7 years ago
Tom Hacohen e0cc13cfd2 Initial code import of the etesync encryption and service module
This will be a small library in the end, but at the moment it's in this
repo for convenience. It includes the etesync service, crypto and tests
to cover them.

The tests require a running debug etesync server.

To create one, just create a server from:
https://github.com/etesync/server-skeleton/

Set DEBUG to True, and create a test user with the credentials that are
listed in the test files.
7 years ago
Tom Hacohen 3a60a35a99 Initial commit. 7 years ago