farmOS / field-kit

A modular, offline-first companion app to farmOS.
https://farmOS.org
GNU General Public License v3.0
59 stars 38 forks source link

Disable core functionality while logged out. #447

Closed jgaehring closed 2 years ago

jgaehring commented 3 years ago

I know to-date we've tried to support most of the functionality in Field Kit's Tasks module even while the user is logged out, but I'm more and more convinced this behavior is untenable as FK 2.x becomes more modular and more reliant on the configuration and schemata it receives from the server. It just adds more complexity as we try to anticipate all the possible configurations prior to establishing an authorized connection with the server.

So, in essence, this will require a different workflow for FK going forward, where when the user opens the app for the very first time, they'll be prompted to login immediately, and will not be able to proceed to any of the core functionality until they do so successfully. Once they do so, they'll also have installed all enabled Field Modules that the server provides, including Tasks if we decide to make it a full Field Module (see #446).

jgaehring commented 2 years ago

This is mostly achieved already, with the changes I've made to the created() lifecyle hook in App.vue, so I think I'm going to bump this up to the alpha milestone. The only thing remaining is to provide a UI for the "not ready" state, but I think I can just add a spinner pretty easily enough, maybe some status text, and add more polish before the general release if desired.

jgaehring commented 2 years ago

Resolved by 52fc84c.