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

fixed hosting banner close function #1161

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 20 additions & 18 deletions pcweb/components/hosting_banner.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,36 @@ def hide_banner(self):
def hosting_banner() -> rx.Component:
return rx.cond(
HostingBannerState.show_banner,
rx.link(
rx.box(
rx.hstack(
rx.link(
rx.box(
rx.text(
"Reflex Cloud - ",
rx.el.span(
"Fast, secure & scalable hosting. One command to deploy.",
class_name="text-slate-12 font-medium text-sm",
rx.box(
rx.text(
"Reflex Cloud - ",
rx.el.span(
"Fast, secure & scalable hosting. One command to deploy.",
class_name="text-slate-12 font-medium text-sm",
),
class_name="text-slate-12 font-semibold text-sm z-[1]",
),
class_name="text-slate-12 font-semibold text-sm z-[1]",
),
rx.el.button(
"Live Now!",
class_name="text-green-11 h-[1.5rem] rounded-md bg-green-4 px-1.5 text-sm font-semibold z-[1] items-center justify-center shrink-0",
rx.el.button(
"Live Now!",
class_name="text-green-11 h-[1.5rem] rounded-md bg-green-4 px-1.5 text-sm font-semibold z-[1] items-center justify-center shrink-0",
),
class_name="flex items-center gap-4",
),
class_name="flex items-center gap-4",
),
glow(),
href=REFLEX_CLOUD_URL,
underline="none",
is_external=True,
),
rx.icon(
"x",
on_click=HostingBannerState.hide_banner,
size=16,
class_name="z-[1] cursor-pointer hover:!text-slate-11 transition-color !text-slate-9 absolute right-4",
class_name="cursor-pointer hover:!text-slate-11 transition-color !text-slate-9 absolute right-4 z-10",
),
glow(),
href=REFLEX_CLOUD_URL,
underline="none",
is_external=True,
class_name="px-4 lg:px-6 w-screen h-auto lg:h-[3.5rem] shadow-[inset_0_-1px_0_0_var(--c-slate-3)] flex items-center justify-center bg-slate-1 flex-row gap-4 overflow-hidden relative lg:py-0 py-2 max-w-full",
),
)
5 changes: 5 additions & 0 deletions pcweb/pcweb.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
from pcweb.telemetry import get_pixel_website_trackers
from pcweb.meta.meta import favicons_links


Copy link
Collaborator

Choose a reason for hiding this comment

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

remove stray whitespace


# This number discovered by trial and error on Windows 11 w/ Node 18, any
# higher and the prod build fails with EMFILE error.
WINDOWS_MAX_ROUTES = int(os.environ.get("REFLEX_WEB_WINDOWS_MAX_ROUTES", "100"))
Expand Down Expand Up @@ -50,6 +52,9 @@
)





# XXX: The app is TOO BIG to build on Windows, so explicitly disallow it except for testing
if sys.platform == "win32":
if not os.environ.get("REFLEX_WEB_WINDOWS_OVERRIDE"):
Expand Down
Loading