1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

ui fixes:

- fix static prefix path customization
- fix old ui logo link without locales
This commit is contained in:
Ilya Kreymer 2022-02-06 14:54:54 -08:00
parent af04deabe6
commit e687ec673c
2 changed files with 4 additions and 3 deletions

View File

@ -107,6 +107,7 @@ class FrontEndApp(object):
self.templates_dir = config.get('templates_dir', 'templates')
self.static_dir = config.get('static_dir', 'static')
self.static_prefix = config.get('static_prefix', 'static')
metadata_templ = os.path.join(self.warcserver.root_dir, '{coll}', 'metadata.yaml')
self.metadata_cache = MetadataCache(metadata_templ)
@ -118,8 +119,8 @@ class FrontEndApp(object):
specific routes (proxy mode, record)
"""
self.url_map = Map()
self.url_map.add(Rule('/static/_/<coll>/<path:filepath>', endpoint=self.serve_static))
self.url_map.add(Rule('/static/<path:filepath>', endpoint=self.serve_static))
self.url_map.add(Rule('/{0}/_/<coll>/<path:filepath>'.format(self.static_prefix), endpoint=self.serve_static))
self.url_map.add(Rule('/{0}/<path:filepath>'.format(self.static_prefix), endpoint=self.serve_static))
self.url_map.add(Rule('/collinfo.json', endpoint=self.serve_listing))
if self.is_valid_coll('$root'):

View File

@ -156,7 +156,7 @@ This file is part of pywb, https://github.com/webrecorder/pywb
if (window.banner_info.logoImg) {
var logo = document.createElement("a");
logo.setAttribute("href", "/" + (window.banner_info.locale ? window.banner_info.locale + "/" : ""));
logo.setAttribute("href", "/" + (window.banner_info.curr_locale ? window.banner_info.curr_locale + "/" : ""));
logo.setAttribute("class", "_wb_linked_logo");
var logoContents = "";