diff --git a/Makefile b/Makefile index df5834d24..0bc340421 100644 --- a/Makefile +++ b/Makefile @@ -97,8 +97,8 @@ bundle: npm run vendor_bundle_js npm run vendor_minify_js # increment serviceworker version - sed -i -e "s/CACHE_VERSION =.*/CACHE_VERSION = $$(awk '/CACHE_VERSION =/ { print 1+$$4 }' lnbits/core/static/js/service-worker.js)/" \ - lnbits/core/static/js/service-worker.js + sed -i -e "s/CACHE_VERSION =.*/CACHE_VERSION = $$(awk '/CACHE_VERSION =/ { print 1+$$4 }' lnbits/static/js/service-worker.js)/" \ + lnbits/static/js/service-worker.js install-pre-commit-hook: @echo "Installing pre-commit hook to git" diff --git a/lnbits/app.py b/lnbits/app.py index 5438b2b3d..31ba46bf1 100644 --- a/lnbits/app.py +++ b/lnbits/app.py @@ -81,12 +81,10 @@ def create_app() -> FastAPI: setattr(core_app_extra, "register_new_ext_routes", register_new_ext_routes(app)) setattr(core_app_extra, "register_new_ratelimiter", register_new_ratelimiter(app)) - app.mount("/static", StaticFiles(packages=[("lnbits", "static")]), name="static") - app.mount( - "/core/static", - StaticFiles(packages=[("lnbits.core", "static")]), - name="core_static", - ) + # register static files + static_path = Path("lnbits", "static") + static = StaticFiles(directory=static_path) + app.mount("/static", static, name="static") g().base_url = f"http://{settings.host}:{settings.port}" diff --git a/lnbits/core/templates/admin/index.html b/lnbits/core/templates/admin/index.html index 3748d77e1..bec9dd615 100644 --- a/lnbits/core/templates/admin/index.html +++ b/lnbits/core/templates/admin/index.html @@ -164,5 +164,5 @@ {% endblock %} {% block scripts %} {{ window_vars(user) }} - + {% endblock %} diff --git a/lnbits/core/templates/core/index.html b/lnbits/core/templates/core/index.html index 985fd8652..1b370f624 100644 --- a/lnbits/core/templates/core/index.html +++ b/lnbits/core/templates/core/index.html @@ -1,5 +1,5 @@ {% extends "public.html" %} {% block scripts %} - + {% endblock %} {% block page %}
@@ -104,7 +104,7 @@