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

Rebrand banner in Desktop App. Closes #2004 #2007

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 3 additions & 1 deletion main/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ const allowedURLs = [
'https://filstation.app/',
'https://github.com/filecoin-station/spark',
'https://beryx.io',
'https://pl-strflt.notion.site/Station-Terms-Conditions-e97da76bb89f49e280c2897aebe4c41f?pvs=4'
'https://pl-strflt.notion.site/Station-Terms-Conditions-e97da76bb89f49e280c2897aebe4c41f?pvs=4',
'https://checker.network',
'https://blog.checker.network/posts/why-web3-needs-the-checker-network'
].map(str => new URL(str))

const allowedURLsRegEx = [
Expand Down
2 changes: 2 additions & 0 deletions renderer/src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ import Sidebar from 'src/components/Sidebar'
import UpdateBanner from 'src/components/UpdateBanner'
import WalletWidget from 'src/components/WalletWidget'
import DraggableArea from 'src/components/DraggableArea'
import RebrandBanner from 'src/components/RebrandBanner'

const Layout = ({ children }: {children: ReactNode}) => {
return (
<div className='h-screen w-screen overflow-x-hidden flex relative app-bg'>
<DraggableArea />
<Sidebar />
<RebrandBanner />
<WalletWidget />
<div className='w-full flex flex-wrap justify-end absolute'>
<UpdateBanner />
Expand Down
36 changes: 36 additions & 0 deletions renderer/src/components/RebrandBanner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import Text from './Text'
import { useState } from 'react'
import CloseIcon from 'src/assets/img/icons/close.svg?react'
import { openExternalURL } from 'src/lib/station-config'
import { useLocation } from 'react-router'
import { ROUTES } from 'src/lib/routes'

const RebrandBanner = () => {
const { pathname } = useLocation()
const [visible, setVisible] = useState<boolean>(true)
juliangruber marked this conversation as resolved.
Show resolved Hide resolved

if (!visible) {
return null
}

if (pathname === ROUTES.wallet) {
return null
}

return (
<div className='absolute top-0 left-0 pl-28 pt-6 flex'>
<div className='bg-primary ml-1 p-6 pr-12 left-40 flex gap-5 rounded-lg'>
<Text font='mono' size='xs' bold className="text-white">🚨 Filecoin Station is becoming the Checker Network. <button onClick={() => openExternalURL('https://blog.checker.network/posts/why-web3-needs-the-checker-network')}><Text font='mono' size='xs' bold className="text-white underline" >Read more</Text></button></Text>
<button
className="absolute top-8 right-2"
onClick={() => setVisible(false)}
>
<CloseIcon />
Copy link
Member

Choose a reason for hiding this comment

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

Screenshot 2025-01-19 at 11 21 13

In the current light, I almost couldn't see the X. Can we change its color to something light, to improve the contrast?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sure

</button>
</div>

</div>
)
}

export default RebrandBanner
Loading