We now save the user's last chosen theme in localStorage and report this value along with the initial theme name (from the app dev, i.e. the page theme) on app startup.
When returning to a shinyswatch app in the same browser, the last chosen theme will be selected. There may be a small flicker on page load that we can't avoid: the app loads with the initial page theme that is then replaced almost immediately by the restored theme selection.
Closes #37
We now save the user's last chosen theme in
localStorage
and report this value along with the initial theme name (from the app dev, i.e. the pagetheme
) on app startup.When returning to a shinyswatch app in the same browser, the last chosen theme will be selected. There may be a small flicker on page load that we can't avoid: the app loads with the initial page theme that is then replaced almost immediately by the restored theme selection.
https://github.com/posit-dev/py-shinyswatch/assets/5420529/1012665c-b6ef-489c-abbb-79f41e611414