Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Serve custom pages #3443

Closed
QxxxGit opened this issue Feb 16, 2023 · 4 comments
Closed

[Feature] Serve custom pages #3443

QxxxGit opened this issue Feb 16, 2023 · 4 comments

Comments

@QxxxGit
Copy link

QxxxGit commented Feb 16, 2023

I think it would be really nice for plugins, userscripts, etc. to have a way to serve a custom page. For example, I'm wanting to create a userscript for a masonry grid view. At the moment I'm having to write a ton of boilerplate to adjust an existing page.

I recognize that this is a lot easier said than done, and there's tons of ways to go about this; but I think for now a single blank page (blank as in no body content, just has the Stash navigation bar) would be beneficial. i.e. localhost:9999/customPage

@stg-annon
Copy link
Collaborator

I believe there currently is a way to do this via the config file, its just not very well documented. I'll have to look into it again

@puc9
Copy link
Contributor

puc9 commented Mar 1, 2023

custom_served_folders
in here: https://docs.stashapp.cc/advanced-tutorials/advanced-configuration-options/

@QxxxGit
Copy link
Author

QxxxGit commented Mar 6, 2023

Apologies for the late response.

I'm aware of the custom served folders, but my request is different. I'm talking about the Stash UI having a template page that only includes the existing CSS and navigation, and that page would import/embed our custom page based on the address.

So for example in config.yml there could be a custom_pages array with key-value pairs to link the address to a page we want to serve.

custom_pages:
    /mypage: /some/path/mypage.html

then when you visit localhost:9999/mypage it serves that page in the body of the existing UI underneath the navigation bar within <div class="main container-fluid">

@WithoutPants WithoutPants added this to the Backlog milestone Mar 14, 2023
@QxxxGit
Copy link
Author

QxxxGit commented Nov 29, 2023

Closing as this is addressed in #4256:

* supports registering page routes via PluginApi.register.route. (eg PluginApi.register.route("/plugin/test-react", TestPage);)

@QxxxGit QxxxGit closed this as completed Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants