Skip to content

Commit

Permalink
outline inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderGi committed Nov 14, 2023
1 parent f3eaa3a commit 55ffef6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion recipes/QRCodeGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def render_form_v2(self):
key=QrSources.qr_code_file.name,
)

if source != QrSources.qr_code_vcard:
if source != QrSources.qr_code_vcard.name:
st.checkbox(
"🔗 Shorten URL",
key="use_url_shortener",
Expand All @@ -184,6 +184,16 @@ def render_form_v2(self):
'A shortened URL enables the QR code to be more beautiful and less "QR-codey" with fewer blocky pixels.'
)

if source != QrSources.qr_code_input_image.name:
st.write("---")
if st.checkbox("🖼️ Add Logo", key="add_logo"):
st.file_uploader(
"Upload a logo image which will be placed in the center of the QR code",
key="logo",
accept=["image/*"],
)
st.checkbox("Remove background", key="remove_logo_background")

def validate_form_v2(self):
assert st.session_state.get("text_prompt"), "Please provide a prompt"
assert any(
Expand Down

0 comments on commit 55ffef6

Please sign in to comment.