Commit Graph

23 Commits

Author SHA1 Message Date
Eli Ribble 4e1922c5fa Split email cache into full content and stubs.
This also introduces status for in-flight requests to avoid perpetual,
unnecessary loops of change-the-re-get-data.
2024-08-29 08:41:34 -07:00
Eli Ribble fb53a7506f Standardize on links for refresh.
Turns out I was doubling-up unnecessarily and had an event handler _and_
a hash change detection. This just made things complex. Now I use the
hash for both the mailbox and the email navigation.

I don't yet do anything with the email part.
2024-08-28 10:35:48 -07:00
Eli Ribble 0d2e43ae83 Add ability to support custom styles
Not using it yet, just thinking about usability and design a bit.
2024-08-28 09:38:23 -07:00
Eli Ribble 5c7e67a2bd Add mailbox to location hash.
Now we can preserve what mailbox we're looking at.
2024-08-28 01:08:27 -07:00
Eli Ribble ee872f6985 Select a mailbox on click, show its email IDs
We'll eventually want to populate them.
2024-08-28 01:08:27 -07:00
Eli Ribble 656495904b Add the ability to select a mailbox.
Just log the mailbox ID for now.
2024-08-28 01:08:27 -07:00
Eli Ribble bab5d421d4 Rip apart client, build a wrapper.
The goal here is to be able to augment the client with additional data
as we get it. At this point I'm now augmenting with the mailbox data
that the MailboxList is requesting and showing that.

That's progress.

There may be significant issues with making multiple requests in a
single round-trip because my client library appears to do things like
hard-coding the position of specific requests. I may have to work around
this.
2024-08-28 01:08:27 -07:00
Eli Ribble c17e8b9ad0 Get to where I'm querying for mailboxes
This won't work, not in the long term, but it's a better direction.

I've created proxy classes for the classes coming from the JMAP client.
The issue here is that this client is likely to have a bunch of things
wrong. Specifically, the standard indicates that the client can be
extremely stateful, to the point where it's just getting a stream of
updates and keeping most of the structure in memory. The client, as
presently built, does not make it easy to honor this part of the
standard, so I'm going to have to structure the client interaction
differently.

However, what I've done here, while interesting, is not good.

The problem is that I am correctly telling the client "I need the list
of mailboxes" when I render the mailbox list, but I'm not able to
propogate that information back to the client since it's passed down
through props.

I'm going to need to separate out the client into its own class and have
an eventing system of some kind between it and the app.
2024-08-28 01:08:27 -07:00
Eli Ribble a93a5d84f3 Trigger account list on valid session.
It's cleaner
2024-08-28 01:08:27 -07:00
Eli Ribble c5afd9f895 Allow selection of the account.
This was surprisingly complex because I tried to use react-router and
found no easily and reasonable way to do it, so instead I hooked the
location change event myself and plumbed it through. This required me to
switch to a class-style component rather than a functional one, which
required translating a bunch of coding styles through React.

Overall I'm happy, it works pretty well and simply.
2024-08-28 01:08:27 -07:00
Eli Ribble 1d7d96de4a Add list of accounts from the session.
This isn't great, but it shows data from the API being fed into the
interface.
2024-08-28 01:08:27 -07:00
Eli Ribble 2b94459651 Only make a single client setup request. 2024-08-28 01:08:27 -07:00
Eli Ribble 05779c0b64 Use tabs, add jmap-client-ts, use it a bit 2024-08-28 01:08:27 -07:00
Eli Ribble 913856c11b Save auth in localstorage and use it
Also consistently call it "email".
2024-08-28 01:08:27 -07:00
Eli Ribble faca28f802 Actually make the login attempt to the well-known JMAP endpoint 2024-08-28 01:08:27 -07:00
Eli Ribble c6400d58d3 Save the username and password, show an alert to prove it. 2024-08-28 01:08:27 -07:00
Eli Ribble 9ff63d96fd Show an alert when we click the "login" button.
Yay, user interactivity.
2024-08-28 01:08:27 -07:00
Eli Ribble cda369a5f0 Auto pretty everything, add initial auth modal.
Sorry this isn't more commits, but, whatever.
2024-08-28 01:08:27 -07:00
Eli Ribble 16d9d4c4a4 Add authentication modal dialog and a stab at localstorage 2024-08-28 01:08:27 -07:00
Eli Ribble 8ea7aac4ed Make a basic remote request for data.
This uses an example from https://www.codingthesmartway.com/how-to-fetch-api-data-with-react/
and a public data API.
2024-08-28 01:08:27 -07:00
Eli Ribble 48191baf2b Start of the mailbox list. 2024-08-28 01:08:27 -07:00
Eli Ribble d1746b6d17 Add react-bootstrap.
Now we're strappin'
2024-08-28 01:08:27 -07:00
Eli Ribble 7cd1a9cd97 Bootstrap with basic create-react-app and typescript.
No real changes to it, and I'm avoiding the favicon and logos to avoid
burdening my git repository, but otherwise it's all here while I figure
out how to change things.
2024-08-28 01:08:26 -07:00