feat: onboarding screen start chat with walletbot

pull/27073/head
Badi ifaoui 2024-01-18 11:58:31 +01:00
parent 505abd5495
commit b570ff94a7
2 changed files with 18 additions and 2 deletions

View File

@ -848,7 +848,7 @@ h2 .sh_VerifiedIcon {
}
.mx_HomePage_default_buttons_title {
font-size: 32px;
font-size: 30px;
}
.cpd-theme-dark .mx_HomePage_default_buttons_title {
opacity: 0.7;

View File

@ -19,6 +19,7 @@ import AutoHideScrollbar from "matrix-react-sdk/src/components/structures/AutoHi
import EmbeddedPage from "matrix-react-sdk/src/components/structures/EmbeddedPage";
import AccessibleButton from "matrix-react-sdk/src/components/views/elements/AccessibleButton";
import { useMatrixClientContext } from "matrix-react-sdk/src/contexts/MatrixClientContext";
import { DirectoryMember, startDmOnFirstMessage } from "matrix-react-sdk/src/utils/direct-messages";
import { getHomePageUrl } from "matrix-react-sdk/src/utils/pages";
import * as React from "react";
@ -48,7 +49,9 @@ const HomePage: React.FC<IProps> = () => {
<SuperheroLogo />
<div>is so much better with our Wallet</div>
</div>
<div className="mx_HomePage_default_buttons_title">Download extension for your browser</div>
<div className="mx_HomePage_default_buttons_title">
<span style={{ fontWeight: "bold" }}>1. </span>Download extension for your browser
</div>
<div className="mx_HomePage_default_buttons">
<AccessibleButton
onClick={(): void => {
@ -72,6 +75,19 @@ const HomePage: React.FC<IProps> = () => {
from Chrome Web Store
</AccessibleButton>
</div>
<div className="mx_HomePage_default_buttons_title">
<span style={{ fontWeight: "bold" }}>2.</span>Connect your wallet with $uperhero Bot
</div>
<div className="mx_HomePage_default_buttons">
<AccessibleButton
onClick={(): void => {
startDmOnFirstMessage(cli, [new DirectoryMember({ user_id: "@walletbot:superhero.com" })]);
}}
className="mx_HomePage_button_custom"
>
Chat with $uperhero Bot
</AccessibleButton>
</div>
</div>
</AutoHideScrollbar>
);