socket icon indicating copy to clipboard operation
socket copied to clipboard

Support configuration for initial navigation

Open jwerle opened this issue 1 year ago • 3 comments

We should support configuring an initial navigation URI in the socket.ini:

[window.navigator]
location = "socket://com.app/path/to/index.html"

or

[window.navigator]
location = "/index.html"

or

[window.navigator]
location = "/" # implies /index.html

jwerle avatar Oct 06 '23 15:10 jwerle

Currently we can see a jerk when index.html loads in app window.We should be able to show a custom spinner while loading index.html and other assets.

ansarizafar avatar Oct 06 '23 15:10 ansarizafar

The lack of configuration here is a problem for some SPA frameworks that use client-side routing (such as Nuxt). Unless I manually configure the path /index.html, Nuxt shows a 404 when the app initially loads. At the very least, being able to configure / as the default could solve this problem.

davidmyersdev avatar Oct 13 '23 23:10 davidmyersdev

You can try this:

[webview]
default_index = "/index.html"

This will be loaded for any type of page navigation

jwerle avatar Oct 13 '23 23:10 jwerle