webrecorder / pywb

Core Python Web Archiving Toolkit for replay and recording of web archives
https://pypi.python.org/pypi/pywb
GNU General Public License v3.0
1.34k stars 207 forks source link

URL of the zoom image in VueUI not using static_prefix #876

Closed Quirinus closed 2 months ago

Quirinus commented 7 months ago

Describe the bug

As the title says: the URL of the zoom image in VueUI is not using static_prefix.

So, if static_prefix in config.yaml is set to something that's not "static" (default), that makes the image source point to the wrong URL (always hardcoded to /static/zoom-out-icon-333316.png), making the image not load/appear broken.

Steps to reproduce the bug

Change the static_prefix in the config.yaml, use the VueUI timeline, zoom somewhere, the zoom image is missing/broken.

Expected behavior

The zoom image should not be missing.

Screenshots

image

Currently the /static/ part is hardcoded, instead of read from static_prefix in config.yaml.

Environment

Additional context

Should be a simple fix in, adding the static prefix to the URL instead of hardcoding it: https://github.com/webrecorder/pywb/blob/main/pywb/static/vue/vueui.js

Search for /static/zoom-out-icon-333316.png, change the /static/ part to point to the static_prefix set in config.yaml. Regenerate the source map.

I might give it a try when I get some time.

tw4l commented 3 months ago

Thanks @Quirinus ! I opted to just replace this icon with a fontawesome icon, since that's how we're handling over icons like this in the header. One fewer static file to worry about :)

Quirinus commented 2 months ago

Thanks @Quirinus ! I opted to just replace this icon with a fontawesome icon, since that's how we're handling over icons like this in the header. One fewer static file to worry about :)

Great, even better, thanks!