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

Finer generation of "Background image" Link #7595

Closed
mittler-works opened this issue Nov 16, 2023 · 2 comments
Closed

Finer generation of "Background image" Link #7595

mittler-works opened this issue Nov 16, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@mittler-works
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Yes, I bind-mount a Background Image into the authentik container, at /web/dist/assets/images/custom_background.png. Then, inside the flow, I set the path to /static/dist/assets/images/custom_background.png. The problem is, the auto-generated "Backgound image" link is still present and points to the default image attribution.

This is because here:

${this.flowInfo?.background?.startsWith("/static")
? html`
<li>
<a
href="https://unsplash.com/@marcute"
>${msg("Background image")}</a
>
</li>
`
: html``}

the Background image link is generated based on the fact that url start with /static.

Describe the solution you'd like

I can think of an easy solution, that would be to check the whole path of the image to be /static/dist/assets/images/flow_background.jpg and not only to check if it starts with /static.

But this is still not optimal either, as there is still a problem: I could come up with the idea to mount a custom image on the default path /static/dist/assets/images/flow_background.jpg so I could have my default image without the need to change the background settings in every flow. With the proposed solution, this szenario would not work either.

Describe alternatives you've considered

I've found a quite easy workaround: it seems that if I prepend the scheme/host to the url, the check does not evaluate to true: e.g. http://localhost:9000/static/dist/assets/images/flow_background.jpg does not seem to trigger the check. However, this forces me to know the host in advance.

@mittler-works mittler-works added the enhancement New feature or request label Nov 16, 2023
@tongkl1
Copy link

tongkl1 commented Feb 24, 2024

It would be great if a toggle can be added to turn off the attribution. Mounting an image to /web/dist/assets/images/flow_background.jpg has multiple benefits than setting the images in single flows, e.g. there's a hardcoded prefetch in the flow template pointing to that image even when a custom image is specified. Currently I have to use custom CSS to make the attribution not display

@BeryJu
Copy link
Member

BeryJu commented Jul 25, 2024

closed by #10318

@BeryJu BeryJu closed this as completed Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants