Skip to content

Commit

Permalink
Add "New dashboard" Banner (#315)
Browse files Browse the repository at this point in the history
* Add new dashboard Banner.tsx

* display on localdev and add todo note

---------

Co-authored-by: Maycon Santos <[email protected]>
  • Loading branch information
heisbrot and mlsmaycon authored Jan 24, 2024
1 parent a3a0e63 commit 4612f6c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {SecureLoading} from "./components/Loading";
import DNS from "./views/DNS";
import Activity from "./views/Activity";
import Settings from "./views/Settings";
import {isLocalDev, isNetBirdHosted} from "./utils/common";


const {Header, Content} = Layout;
Expand Down Expand Up @@ -75,7 +76,7 @@ function App() {
{!show && <SecureLoading padding="3em" width={50} height={50}/>}
{show &&
<Layout>
<Banner/>
{(isNetBirdHosted() || isLocalDev()) && <Banner/>}
<Header className="header" style={{
display: "flex",
flexDirection: "column",
Expand Down
8 changes: 5 additions & 3 deletions src/components/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@ const Banner = () => {
localStorage.setItem(banner_closed_key,'true');
};

const announcement = "NetBird is now available on the App Store."
// todo: when updating this announcement, ensure to
// remove the condition on App.tsx that limits the current banner to cloud and local dev
const announcement = "Discover the new NetBird Dashboard with a brand new look and feel."

const announcement_md5 = Md5.hashStr(announcement)

const linkLearnMore = () => {
return (
<a
href="https://apps.apple.com/us/app/netbird-p2p-vpn/id6469329339"
href="https://preview.netbird.io/peers"
className="font-bold underline"
target="_blank"
rel="noreferrer"
><Text strong style={{color: "#ffffff"}}>Download&nbsp;<span aria-hidden="true">&rarr;</span></Text></a>
><Text strong style={{color: "#ffffff"}}>Try it out now&nbsp;<span aria-hidden="true">&rarr;</span></Text></a>
)
}

Expand Down

0 comments on commit 4612f6c

Please sign in to comment.