Add "New dashboard" Banner (#315)

* Add new dashboard Banner.tsx

* display on localdev and add todo note

---------

Co-authored-by: Maycon Santos <mlsmaycon@gmail.com>
This commit is contained in:
Eduard Gert
2024-01-24 18:36:20 +01:00
committed by GitHub
parent a3a0e6315f
commit 4612f6c49a
2 changed files with 7 additions and 4 deletions

View File

@@ -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;
@@ -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",

View File

@@ -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>
)
}