diff --git a/daras_ai_v2/base.py b/daras_ai_v2/base.py index c52d6b5a6..4362418bf 100644 --- a/daras_ai_v2/base.py +++ b/daras_ai_v2/base.py @@ -329,7 +329,7 @@ def _render_header(self): and MenuTabs.integrations != self.tab ): st.write(published_run.notes) - elif is_root_example: + elif is_root_example and MenuTabs.integrations != self.tab: st.write(self.preview_description(current_run.to_dict())) def can_user_edit_run(self, current_run: SavedRun | None = None) -> bool: diff --git a/gooey_ui/components/__init__.py b/gooey_ui/components/__init__.py index 41d76d7ce..3ab967df8 100644 --- a/gooey_ui/components/__init__.py +++ b/gooey_ui/components/__init__.py @@ -518,12 +518,15 @@ def anchor( type: typing.Literal["primary", "secondary", "tertiary", "link"] = "secondary", disabled: bool = False, unsafe_allow_html: bool = False, + new_tab: bool = False, **props, ): className = f"btn btn-theme btn-{type} " + props.pop("className", "") style = props.pop("style", {}) if disabled: style["pointerEvents"] = "none" + if new_tab: + props["target"] = "_blank" with tag("a", href=href, className=className, style=style, **props): markdown(dedent(label), unsafe_allow_html=unsafe_allow_html) diff --git a/recipes/VideoBots.py b/recipes/VideoBots.py index 179ecf6cf..b0d272b99 100644 --- a/recipes/VideoBots.py +++ b/recipes/VideoBots.py @@ -1130,7 +1130,7 @@ def integration_connect_screen( Whatsapp -
Bring your own WhatsApp number to connect. Need a new one? Email sales@gooey.ai.
+
Bring your own WhatsApp number to connect. Need a new one? Email sales@gooey.ai.
@@ -1322,6 +1322,30 @@ def integration_test_config_screen( ): raise RedirectException(add_integration) + if bi.platform == Platform.WHATSAPP and bi.wa_business_waba_id: + col1, col2 = st.columns(2, style={"align-items": "center"}) + with col1: + st.write("###### Whatsapp Business Management") + st.caption( + f"Only touch if you know what you're doing. Changing phonenumber(s) will break the Gooey integration." + ) + with col2: + st.anchor( + "Business Settings", + f"https://business.facebook.com/settings/whatsapp-business-accounts/{bi.wa_business_waba_id}", + new_tab=True, + ) + st.anchor( + "WhatsApp Manager", + f"https://business.facebook.com/wa/manage/home/?waba_id={bi.wa_business_waba_id}", + new_tab=True, + ) + st.anchor( + "Phone Numbers", + "https://business.facebook.com/wa/manage/phone-numbers", + new_tab=True, + ) + def chat_list_view(): # render a reversed list view