-
Notifications
You must be signed in to change notification settings - Fork 604
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add desktop download URL and instructions (#1233)
* feat: add desktop download URL and instructions - add a downloadUrls.desktop property - add a wallet.desktop.instructions property - set these on the Ledger connector to present desktop and mobile app download buttons for Ledger Live * fix: getWalletConnectUri in qrCode getUri * feat: platform detection util * feat: platforms util type enum * feat: platform specific desktop download urls * feat: ledger connector download urls and learn mores * chore: amend changeset * feat: connect instruction step icon * feat: desktop flow learn more button * revert: mobile action label * feat: platform label in desktop download details * feat: desktop connect details platform icons * fix: rename it Ledger * fix: linting * fix: dependency * fix: i18n string for mobile and desktop wallet * fix: i18n connector strings * chore: update changeset * chore: update macos icon to sonoma * fix: missing i18n strings --------- Co-authored-by: Daniel Sinclair <d@niel.nyc>
- Loading branch information
1 parent
9b567f9
commit ef64a22
Showing
17 changed files
with
457 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
'@rainbow-me/rainbowkit': minor | ||
--- | ||
|
||
**Improved desktop wallet download support** | ||
|
||
RainbowKit wallet connectors now support desktop download links and desktop | ||
wallet instructions. | ||
|
||
Dapps that utilize the Custom Wallets API can reference the updated docs [here](https://www.rainbowkit.com/docs/custom-wallets). | ||
|
||
```ts | ||
{ | ||
downloadUrls: { | ||
windows: 'https://my-wallet/windows-app', | ||
macos: 'https://my-wallet/macos-app', | ||
linux: 'https://my-wallet/linux-app', | ||
desktop: 'https://my-wallet/desktop-app', | ||
} | ||
} | ||
``` | ||
|
||
We've also introduced a new 'connect' `InstructionStepName` type in the `instructions` API to provide wallet connection instructions. | ||
|
||
```ts | ||
return { | ||
connector, | ||
desktop: { | ||
getUri, | ||
instructions: { | ||
learnMoreUrl: 'https://my-wallet/learn-more', | ||
steps: [ | ||
// ... | ||
{ | ||
description: 'A prompt will appear for you to approve the connection to My Wallet.' | ||
step: 'connect', | ||
title: 'Connect', | ||
} | ||
] | ||
}, | ||
}, | ||
} | ||
``` |
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,18 @@ | ||
import React from 'react'; | ||
import { AsyncImage } from '../AsyncImage/AsyncImage'; | ||
import { loadImages } from '../AsyncImage/useAsyncImage'; | ||
|
||
const src = async () => (await import('./connect.svg')).default; | ||
|
||
export const preloadConnectIcon = () => loadImages(src); | ||
|
||
export const ConnectIcon = () => ( | ||
<AsyncImage | ||
background="#515a70" | ||
borderColor="generalBorder" | ||
borderRadius="10" | ||
height="48" | ||
src={src} | ||
width="48" | ||
/> | ||
); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
ef64a22
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
rainbowkit-site – ./
rainbowkit-site-git-main-rainbowdotme.vercel.app
v1-rainbowkit.vercel.app
v2-rainbowkit.vercel.app
rainbowkit-site-rainbowdotme.vercel.app
rainbowkit.vercel.app
www.rainbowkit.com
rainbowkit.com
ef64a22
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
rainbowkit-example – ./
rainbowkit-example-git-main-rainbowdotme.vercel.app
rainbowkit-example.vercel.app
rainbowkit-example-rainbowdotme.vercel.app