diffusionbee-stable-diffusion-ui
diffusionbee-stable-diffusion-ui copied to clipboard
Move to a proper router
The routing system in the app today is essentially boolean flags that toggle the visibility of components: https://github.com/divamgupta/diffusionbee-stable-diffusion-ui/blob/0155fc04b6859dbaba203fa3a0ebe151fd17c91c/electron_app/src/App.vue#L18-L22
That works okay-ish at that outer application frame level, but it becomes pretty tedious to switch routes from within components:
https://github.com/divamgupta/diffusionbee-stable-diffusion-ui/blob/a4a8659102960ae3825f9111c3d378fe16f58967/electron_app/src/components/ImageItem.vue#L66
Using a proper router would help us out here, and also allow for easier lazy loading of components. Vue Router is the most common choice, and it has a syntax e.g.:
<router-link to="img2img">Img2Img</router-link>