tylerjrichards / st-paywall

A python package for creating subscription Streamlit apps
MIT License
235 stars 46 forks source link

Control on where to add the login button. #40

Closed marcosberghahn closed 9 months ago

marcosberghahn commented 9 months ago

Another quick sugestion here: I will need to insert the login button in other places than the sidebar. I saw that your "markdown_button" function that creates the button already have a bool parameter to add to the sidebar or not. But that property is not included in the show_login_button funtion. it will be great if we can include it. that way we can simply call the show_login_button when we need to place a login button.

Here is change a sugestion, since I have it at hand: def show_login_button(sidebar: bool = True): authorization_url = asyncio.run( get_authorization_url(client=client, redirect_url=redirect_url) ) markdown_button(authorization_url, "Login with Google", sidebar = sidebar)

@tylerjrichards: this repo became important to a project I'm creating, so I will love to help in any way I can. Instead of forking it and dividing effort.

tylerjrichards commented 9 months ago

that's so exciting, glad you're using it Marcos! I have plans to work on this repo this week, but if you want something faster i'm happy to review PRs ASAP. Thanks for the offer for help, would really appreciate it

tylerjrichards commented 9 months ago

this is fixed now, I went through and looked at your edits, greatly appreciate them. I think the text is a good add, as is the sidebar edit. I don't think the color will look great though, unless we can also switch the color of the other buttons. either way, closing this issue for now