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

fix: urls for js libs on print.html #2185

Merged
merged 2 commits into from
Dec 18, 2023
Merged

fix: urls for js libs on print.html #2185

merged 2 commits into from
Dec 18, 2023

Conversation

talvasconcelos
Copy link
Collaborator

This fixes, for example, printing LNURLw vouchers.

@talvasconcelos talvasconcelos added the bug Something isn't working label Dec 16, 2023
@talvasconcelos
Copy link
Collaborator Author

Closes lnbits/withdraw#22

Copy link

codecov bot commented Dec 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7b9d370) 59.28% compared to head (07c01ab) 59.28%.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #2185   +/-   ##
=======================================
  Coverage   59.28%   59.28%           
=======================================
  Files          59       59           
  Lines        8864     8864           
=======================================
  Hits         5255     5255           
  Misses       3609     3609           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@prusnak prusnak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we also need to fix the CSS:

diff --git a/lnbits/templates/print.html b/lnbits/templates/print.html
index ef6beb4a..4fde0878 100644
--- a/lnbits/templates/print.html
+++ b/lnbits/templates/print.html
@@ -3,7 +3,7 @@
 <html lang="en">
   <head>
     {% for url in INCLUDED_CSS %}
-    <link rel="stylesheet" type="text/css" href="{{ url }}" />
+    <link rel="stylesheet" type="text/css" href="{{ static_url_for('static', url) }}" />
     {% endfor %}
     <style>
       @page {

Copy link
Collaborator

@prusnak prusnak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CSS fixed in 07c01ab

@dni dni changed the title fix the url for js libs fix: urls for js libs on print.html Dec 18, 2023
@dni dni merged commit 97f8a4a into dev Dec 18, 2023
22 checks passed
@dni dni deleted the fix_print_html_js_urls branch December 18, 2023 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants