-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(keyAutoAdd): show notification with connect progress (#634)
- Loading branch information
1 parent
1edee22
commit b38ad6d
Showing
21 changed files
with
504 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import { useUIMode } from '@/pages/progress-connect/context'; | ||
import { AppNotification } from '@/pages/progress-connect/components/AppNotification'; | ||
import { AppFullscreen } from '@/pages/progress-connect/components/AppFullScreen'; | ||
|
||
export default function App() { | ||
const mode = useUIMode(); | ||
|
||
React.useEffect(() => { | ||
const container = document.getElementById('container')!; | ||
container.style.height = mode === 'fullscreen' ? '100vh' : 'auto'; | ||
document.body.style.backgroundColor = | ||
mode === 'fullscreen' ? 'rgba(255, 255, 255, 0.95)' : 'white'; | ||
}, [mode]); | ||
|
||
if (mode === 'fullscreen') { | ||
return <AppFullscreen />; | ||
} else { | ||
return <AppNotification />; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from 'react'; | ||
import { useState } from '@/pages/progress-connect/context'; | ||
import { useBrowser } from '@/popup/lib/context'; | ||
import { Steps } from './Steps'; | ||
|
||
export function AppFullscreen() { | ||
const browser = useBrowser(); | ||
const state = useState(); | ||
|
||
const Logo = browser.runtime.getURL('assets/images/logo.svg'); | ||
|
||
return ( | ||
<div className="m-auto flex h-full w-full max-w-80 flex-col items-center justify-center space-y-2 p-4 text-center"> | ||
<header> | ||
<img src={Logo} alt="" className="mx-auto mb-2 h-20" /> | ||
<h1 className="text-2xl text-strong">Web Monetization</h1> | ||
<h2 className="text-lg text-weak">Connecting wallet…</h2> | ||
</header> | ||
<main className="w-full space-y-2 pt-2"> | ||
<Steps steps={state.steps} /> | ||
<p className="text-xs text-weak">{state.currentStep.name}…</p> | ||
</main> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.