feat: Add Branding and Social Links to the UI Feature flags (#3169)

* Add branding and socials FF

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Mike Fortman 2024-08-06 13:46:03 -05:00 committed by GitHub
commit dedad1e240
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 38 additions and 29 deletions

View file

@ -2,5 +2,7 @@
"ENABLE_DARK_MODE": true,
"ENABLE_API": true,
"ENABLE_LANGFLOW_STORE": true,
"ENABLE_PROFILE_ICONS": true
"ENABLE_PROFILE_ICONS": true,
"ENABLE_SOCIAL_LINKS": true,
"ENABLE_BRANDING": true
}

View file

@ -155,34 +155,38 @@ export default function Header(): JSX.Element {
</div>
<div className="header-end-division">
<div className="header-end-display">
<a
href="https://github.com/langflow-ai/langflow"
target="_blank"
rel="noreferrer"
className="header-github-link gap-2"
>
<FaGithub className="h-5 w-5" />
<div className="hidden lg:block">Star</div>
<div className="header-github-display">{stars ?? 0}</div>
</a>
<a
href="https://twitter.com/langflow_ai"
target="_blank"
rel="noreferrer"
className="text-muted-foreground"
>
<RiTwitterXFill className="side-bar-button-size" />
</a>
<a
href="https://discord.gg/EqksyE2EX9"
target="_blank"
rel="noreferrer"
className="text-muted-foreground"
>
<FaDiscord className="side-bar-button-size" />
</a>
{FeatureFlags.ENABLE_SOCIAL_LINKS && (
<>
<a
href="https://github.com/langflow-ai/langflow"
target="_blank"
rel="noreferrer"
className="header-github-link gap-2"
>
<FaGithub className="h-5 w-5" />
<div className="hidden lg:block">Star</div>
<div className="header-github-display">{stars ?? 0}</div>
</a>
<a
href="https://twitter.com/langflow_ai"
target="_blank"
rel="noreferrer"
className="text-muted-foreground"
>
<RiTwitterXFill className="side-bar-button-size" />
</a>
<a
href="https://discord.gg/EqksyE2EX9"
target="_blank"
rel="noreferrer"
className="text-muted-foreground"
>
<FaDiscord className="side-bar-button-size" />
</a>
<Separator orientation="vertical" />
<Separator orientation="vertical" />
</>
)}
{FeatureFlags.ENABLE_DARK_MODE && (
<button
className="extra-side-bar-save-disable"

View file

@ -1,3 +1,4 @@
import FeatureFlags from "@/../feature-config.json";
import { useGetGlobalVariables } from "@/controllers/API/queries/variables";
import { useEffect } from "react";
import { useNavigate, useParams } from "react-router-dom";
@ -59,7 +60,9 @@ export default function FlowPage({ view }: { view?: boolean }): JSX.Element {
href="https://medium.com/logspace/langflow-datastax-better-together-1b7462cebc4d"
className="langflow-page-icon"
>
{version && <div className="mt-1">Langflow 🤝 DataStax</div>}
{FeatureFlags.ENABLE_BRANDING && version && (
<div className="mt-1">Langflow 🤝 DataStax</div>
)}
<div className={version ? "mt-2" : "mt-1"}> v{version}</div>
</a>
</div>