divamgupta / divamgupta/diffusionbee-stable-diffusion-ui

Move to a proper router

Open
#244 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
13.6k
Forks
727
PR merge metrics
No merged PRs in 30d

Description

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](https://router.vuejs.org/) is the most common choice, and it has a syntax e.g.:

```vue
Img2Img
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.