Default page problem

Hello,

We are a small team working on building an agritech application based on the farmOS client, and we would like to ask some questions about changing the default login page.

By default, when a user opens the app, it automatically loads the Tasks page, however, we want to change it to the Login page.

We looked at the code in app.vue,

Router and fieldmodules.js.
In fieldMoudules.js line 43:
// Reroutes / to Home if there are modules, otherwise Tasks.

But we did not find a place to change it.

We are very new and unfamiliar with Vue.js so any help would be appreciated.

Sincerely,
Liam

2 Likes

Hi Liam - great question and great timing!

@jgaehring (Field Kit maintainer) recently brought up a similar idea with regard to the Field Kit 2.x roadmap that he is working on. I’ll try to summarize, but @jgaehring feel free to correct me or add more!

In Field Kit 1.x, we originally allowed users to start using the app before they were logged in (as you described). This lowered the barrier to downloading Field Kit and starting to use it (potentially offline) immediately.

However, in Field Kit 2.x, we are going to be changing it so that you must log in first, before you are able to do anything else (also as you describe). So… what you’re requesting is already on the roadmap! :slight_smile:

There is a tradeoff here, of course, because it means that someone using Field Kit must be online the first time they use it, to log in. This is more important in 2.x because that is how Field Kit will determine which “Field Modules” a user will have (Field Modules are mini-apps that can be loaded from the server based on server modules that are enabled, and in the future also based on what permissions the user has).

Hope that all makes sense, and helps to provide context around where we’re headed. It might not help you in the short term, however, if you are intent on building on the 1.x version of Field Kit. We are focusing development on 2.x, so there won’t be further development on the old version unfortunately. So if you do proceed, you may end up maintaining your own fork of the project. If, however, you have some time before you need a finished product, then I would highly recommend following the 2.x progress (and of course if you are able/willing to help we would welcome it!)