From e562b120f39a82d974bd02de3eb0f3c502061bdf Mon Sep 17 00:00:00 2001 From: mvaivre Date: Mon, 16 Dec 2024 15:42:33 +0100 Subject: [PATCH] Further simplification of welcome screen --- .../src/components/PageComponents/SideBar.tsx | 35 ------------- .../src/pages/HomePage/UnlockPanel.tsx | 36 +++++++++----- .../UnlockedWallet/UnlockedWalletLayout.tsx | 49 ++++++++++++++++--- 3 files changed, 67 insertions(+), 53 deletions(-) diff --git a/apps/desktop-wallet/src/components/PageComponents/SideBar.tsx b/apps/desktop-wallet/src/components/PageComponents/SideBar.tsx index ecde5d7eb..608d975ad 100644 --- a/apps/desktop-wallet/src/components/PageComponents/SideBar.tsx +++ b/apps/desktop-wallet/src/components/PageComponents/SideBar.tsx @@ -21,7 +21,6 @@ import { ReactNode } from 'react' import { useTranslation } from 'react-i18next' import styled, { css } from 'styled-components' -import AlephiumLogo from '@/components/AlephiumLogo' import Button from '@/components/Button' import ThemeSwitcher from '@/components/ThemeSwitcher' import WalletNameButton from '@/components/WalletNameButton' @@ -46,12 +45,6 @@ const SideBar = ({ renderTopComponent, noExpansion = false, noBorder = false, cl return ( - - - - - {!noExpansion && alephium} - {renderTopComponent?.()} @@ -102,34 +95,6 @@ const SideBarStyled = styled.div<{ noBorder: boolean; noExpansion: boolean }>` `} ` -const BrandContainer = styled.div` - display: flex; - gap: 14px; - align-items: center; - margin-bottom: var(--spacing-7); -` - -const AlephiumLogoContainer = styled.div` - display: flex; - align-items: center; - justify-content: center; - padding: 12px; - width: 36px; - height: 36px; - border-radius: 100px; - background-color: ${({ theme }) => theme.bg.contrast}; -` - -const AlephiumName = styled.div` - font-size: 18px; - font-weight: var(--fontWeight-semiBold); - display: none; - - @media (min-width: ${SIDEBAR_EXPAND_THRESHOLD_PX}px) { - display: block; - } -` - const TopContainer = styled.div` display: flex; flex-direction: column; diff --git a/apps/desktop-wallet/src/pages/HomePage/UnlockPanel.tsx b/apps/desktop-wallet/src/pages/HomePage/UnlockPanel.tsx index 2dd402caa..f6c3ff096 100644 --- a/apps/desktop-wallet/src/pages/HomePage/UnlockPanel.tsx +++ b/apps/desktop-wallet/src/pages/HomePage/UnlockPanel.tsx @@ -22,12 +22,12 @@ import { useTranslation } from 'react-i18next' import { useNavigate } from 'react-router-dom' import styled from 'styled-components' +import AlephiumLogo from '@/components/AlephiumLogo' import Button from '@/components/Button' import Input from '@/components/Inputs/Input' import Select from '@/components/Inputs/Select' import WalletPassphrase from '@/components/Inputs/WalletPassphrase' import { FloatingPanel, Section } from '@/components/PageComponents/PageContainers' -import PanelTitle from '@/components/PageComponents/PanelTitle' import Paragraph from '@/components/Paragraph' import ConnectWithLedgerButton from '@/features/ledger/ConnectWithLedgerButton' import { useWalletConnectContext } from '@/features/walletConnect/walletConnectContext' @@ -78,17 +78,11 @@ const UnlockPanel = ({ onNewWalletLinkClick }: UnlockPanelProps) => { return ( <> - - {pendingDappConnectionUrl - ? t('Connect to dApp') - : isAwaitingSessionRequestApproval - ? t('Received dApp request') - : t('Welcome back.')} - - - {pendingDappConnectionUrl || - t(wallets.length === 1 ? 'Unlock your wallet to continue.' : 'Unlock a wallet to continue.')} - + + + + +