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 1 commit 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
40 changes: 40 additions & 0 deletions renderer/src/components/RebrandBanner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
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'


Check failure on line 8 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (macos-latest)

More than 1 blank line not allowed

Check failure on line 8 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

More than 1 blank line not allowed

Check failure on line 8 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (windows-latest)

More than 1 blank line not allowed


const RebrandBanner = () => {
const { pathname } = useLocation()

Check failure on line 12 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Expected indentation of 2 spaces but found 4

Check failure on line 12 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Expected indentation of 2 spaces but found 4

Check failure on line 12 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Expected indentation of 2 spaces but found 4
const [visible, setVisible] = useState<boolean>(true)

Check failure on line 13 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Expected indentation of 2 spaces but found 4

Check failure on line 13 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Expected indentation of 2 spaces but found 4

Check failure on line 13 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Expected indentation of 2 spaces but found 4

if (!visible) {

Check failure on line 15 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Expected indentation of 2 spaces but found 4

Check failure on line 15 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Expected indentation of 2 spaces but found 4

Check failure on line 15 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Expected indentation of 2 spaces but found 4
return null
}

Check failure on line 17 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Expected indentation of 2 spaces but found 4

Check failure on line 17 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Expected indentation of 2 spaces but found 4

Check failure on line 17 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Expected indentation of 2 spaces but found 4

if (pathname === ROUTES.wallet) {

Check failure on line 19 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Expected indentation of 2 spaces but found 4

Check failure on line 19 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Expected indentation of 2 spaces but found 4

Check failure on line 19 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Expected indentation of 2 spaces but found 4
return null

Check failure on line 20 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Expected indentation of 4 spaces but found 8

Check failure on line 20 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Expected indentation of 4 spaces but found 8

Check failure on line 20 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Expected indentation of 4 spaces but found 8
}

Check failure on line 21 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Expected indentation of 2 spaces but found 4

Check failure on line 21 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Expected indentation of 2 spaces but found 4

Check failure on line 21 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Expected indentation of 2 spaces but found 4

Check failure on line 22 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Trailing spaces not allowed

Check failure on line 22 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Trailing spaces not allowed

Check failure on line 22 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Trailing spaces not allowed

Check failure on line 23 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (macos-latest)

More than 1 blank line not allowed

Check failure on line 23 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

More than 1 blank line not allowed

Check failure on line 23 in renderer/src/components/RebrandBanner.tsx

View workflow job for this annotation

GitHub Actions / build (windows-latest)

More than 1 blank line not allowed
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 />
</button>
</div>

</div>
)
}

export default RebrandBanner
Loading