hargata / lubelog

LubeLogger is a web-based vehicle maintenance and fuel mileage tracker
https://lubelogger.com
Other
786 stars 30 forks source link

[Feature] Mobile PWA shortcuts #487

Closed shall0pass closed 1 week ago

shall0pass commented 3 weeks ago

Checklist Please make sure you have performed the following steps before opening a new bug ticket, change [ ] to [x] to mark it as done

Description I believe PWA's have the ability to add quick shortcuts that are accessible with a long press. It would be awesome if some some of the pages could be accessed that way. In my case, I intend to use the Fuel page a lot... weekly. Having a shortcut could cut down on the amount of navigating I have to do to get to the page. I'm not sure how I would handle which vehicle's page it would navigate to. Being able to set a default vehicle from the garage, or having a menu option on the page.

Thanks for the awesome program. I've always been terrible with keeping piles of paper in service records. I'm hoping this will help change my bad habits.

Platform

redge76 commented 3 weeks ago

I guess it's already available. With chrome for android: 1) in lubelog settings set "fuel" as default tab 2) navigate to the car you wand to link 3) in the browser, select the 3 dots in upper right and select "add to home screen" 4) you get an icon on your phone that connect to the right car in the "fuel" tab.

shall0pass commented 3 weeks ago

Hmm. Mine keeps defaulting to the Garage after I install it, regardless if I'm in a vehicle screen or not. I'll keep working with it. I've had other issues with Cloudflare and too many redirects that have been messing with the PWA functionality, so it may be on my end. Thanks for the tip.

hargata commented 2 weeks ago

This is very niche, but I did find a pretty decent workaround for your use case.

Navigate to your LubeLogger instance, look for the file manifest.json in /wwwroot folder and remove the start_url line

image

Navigate to your vehicle on your mobile phone browser, when you add the PWA, make sure that the url looks something like this:

https://your-lubelogger-instance.com/Vehicle/Index?vehicleId=vehicle-id

e.g.:

https://demo.lubelogger.com/Vehicle/Index?vehicleId=1

Now every time you open the PWA it will automatically load the vehicle details for the specific vehicle. You can then set the default tab on top of that so that it will automatically pull up the Fuel tab.