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

feat(send-evm): new layout #544

Merged
merged 19 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
81ad4d4
Merge branch 'feat/signature-new-layout' of https://github.com/syscoi…
GabrielPrediger Jan 24, 2024
be9ac0b
feat(SendEvm): new layout of step 1
GabrielPrediger Jan 24, 2024
1a71d07
feat(SendEvm): new layout of step 2 confirm
GabrielPrediger Jan 24, 2024
2189aa8
feat(SendEvm): new layout of step 2 edit fee
GabrielPrediger Jan 25, 2024
995307e
feat(SendEvm): new layout of step 2 edit fee
GabrielPrediger Jan 25, 2024
96e433d
fix(ImportToken): icons position
GabrielPrediger Jan 26, 2024
275ded5
feat(SendEvm): select token layout
GabrielPrediger Jan 26, 2024
2ae8816
feat(Receive): receive new style
GabrielPrediger Jan 26, 2024
976277d
feat(Receive): receive new style
GabrielPrediger Jan 26, 2024
c5a3862
Merge branch 'develop' of https://github.com/syscoin/pali-wallet into…
GabrielPrediger Jan 26, 2024
1cc4181
feat(SendUtxo): new layout of step 1
GabrielPrediger Jan 26, 2024
0b78c7f
feat(SendEvm): fee modal layout
GabrielPrediger Jan 31, 2024
c76345a
Merge branch 'feat/send-new-layout' of https://github.com/syscoin/pal…
GabrielPrediger Jan 31, 2024
1e52af7
chore: remove unused imports
GabrielPrediger Jan 31, 2024
e9d5461
Merge pull request #545 from syscoin/feat/send-utxo-new-layout
lucasgabrielgsp Feb 1, 2024
4308793
Merge pull request #543 from syscoin/feat/receive-new-layout
lucasgabrielgsp Feb 1, 2024
7ffe138
chore: merge changes from feat/send-new-layout
lucasgabrielgsp Feb 1, 2024
8f935b5
Merge pull request #542 from syscoin/fix/import-token-icons
lucasgabrielgsp Feb 1, 2024
427309c
chore: merge changes from develop
lucasgabrielgsp Feb 1, 2024
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
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REACT_APP_SEED_PEACE_GLOBE
2 changes: 1 addition & 1 deletion palette.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ module.exports = {
},

alpha: {
whiteAlpha300: '#FFFFFF29',
whiteAlpha300: 'rgba(255, 255, 255, 0.16)',
whiteAlpha200: 'rgba(255, 255, 255, 0.08)',
},

Expand Down
3 changes: 3 additions & 0 deletions source/assets/icons/ArrowDown.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions source/assets/icons/info.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions source/assets/images/paliLogoWhiteSmall.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 14 additions & 1 deletion source/assets/styles/custom-autolock-input.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.custom-autolock-input {
display: flex;
width: 352px !important;
width: 352px;
height: 40px;
padding: 11px 73px;
align-items: center;
Expand All @@ -9,3 +9,16 @@
background-color: #07152a !important;
font-size: 12px;
}

.custom-gas-input {
display: flex;
width: 352px;
height: 40px;
padding: 11px 20px;
flex-direction: column;
justify-content: center;
align-items: flex-start;
border-radius: 100px;
border: 1px solid rgba(255, 255, 255, 0.16);
background: #162742;
}
42 changes: 42 additions & 0 deletions source/assets/styles/custom-import-token-input.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.custom-import-input .ant-input {
display: flex;
width: 352px;
height: 40px;
padding: 12px 55px 12px 15px;
align-items: center;
border-radius: 100px;
border: 1px solid rgba(255, 255, 255, 0.16);
background-color: #07152a !important;
font-size: 12px;
}

.custom-import-input .ant-input-suffix .anticon-close-circle {
content: url('../icons/errorIcon.svg');
position: absolute;
top: 55%;
right: 28px;
transform: translateY(-50%);
cursor: pointer;
font-size: 14px;
line-height: 14px;
}

.custom-import-input .ant-input-suffix .anticon-check-circle {
content: url('../icons/successIcon.svg');
position: absolute;
top: 53%;
right: 28px;
transform: translateY(-50%);
cursor: pointer;
font-size: 14px;
line-height: 14px;
}

.custom-import-input .ant-input-suffix .anticon-loading {
position: absolute;
top: 40%;
right: 28px;
cursor: pointer;
font-size: 14px;
line-height: 14px;
}
33 changes: 33 additions & 0 deletions source/assets/styles/custom-receive-input.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.custom-receive-input {
display: flex;
width: 352px;
height: 40px;
align-items: center;
border-radius: 100px;
border: 1px solid rgba(255, 255, 255, 0.16);
background-color: #07152a;
font-size: 12px;
padding: 12px 55px 12px 15px;
}

.custom-receive-input .ant-input-suffix .anticon-close-circle {
content: url('../icons/errorIcon.svg');
position: absolute;
top: 55%;
right: 80px;
transform: translateY(-50%);
cursor: pointer;
font-size: 14px;
line-height: 14px;
}

.custom-receive-input .ant-input-suffix .anticon-check-circle {
content: url('../icons/successIcon.svg');
position: absolute;
top: 53%;
right: 40px;
transform: translateY(-50%);
cursor: pointer;
font-size: 14px;
line-height: 14px;
}
78 changes: 78 additions & 0 deletions source/assets/styles/custom-send-utxo-input.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
.sender-custom-input .ant-input {
display: flex;
width: 352px;
height: 40px;
padding: 11px 20px;
border-radius: 100px;
border: 1px solid rgba(255, 255, 255, 0.16);
background-color: #07152a !important;
font-size: 12px;
}

#with-max-button,
.sender-custom-input .ant-input {
width: 244px;
padding: 10px 70px;
}

#fee-input,
.sender-custom-input .ant-input {
width: 352px;
color: #fff !important;
padding: 11px 20px;
}

.sender-custom-input .ant-input-suffix .anticon-close-circle {
content: url('../icons/errorIcon.svg');
position: absolute;
top: 18.5rem;
right: 45px;
transform: translateY(-50%);
cursor: pointer;
font-size: 14px;
line-height: 14px;
}

.sender-custom-input .ant-input-suffix .anticon-check-circle {
content: url('../icons/successIcon.svg');
position: absolute;
top: 18.5rem;
right: 45px;
transform: translateY(-50%);
cursor: pointer;
font-size: 14px;
line-height: 14px;
}

.value-custom-input .ant-input {
display: flex;
width: 244px;
height: 40px;
padding: 11px 20px;
border-radius: 100px;
border: 1px solid rgba(255, 255, 255, 0.16);
background-color: #07152a !important;
font-size: 12px;
}

.value-custom-input .ant-input-suffix .anticon-close-circle {
content: url('../icons/errorIcon.svg');
position: absolute;
top: 1.2rem;
right: 23px;
transform: translateY(-50%);
cursor: pointer;
font-size: 14px;
line-height: 14px;
}

.value-custom-input .ant-input-suffix .anticon-check-circle {
content: url('../icons/successIcon.svg');
position: absolute;
top: 1.2rem;
right: 23px;
transform: translateY(-50%);
cursor: pointer;
font-size: 14px;
line-height: 14px;
}
40 changes: 23 additions & 17 deletions source/components/Fee/Fee.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,23 @@ import { Form, Input } from 'antd';
import React from 'react';
import { useTranslation } from 'react-i18next';

import { Icon, Tooltip } from '..';
import { Tooltip } from '..';

export const Fee = ({
recommend,
disabled,
form,
fiatValue,
}: {
disabled: boolean;
fiatValue?: string;
form: any;
recommend?: number;
}) => {
const { t } = useTranslation();
return (
<Tooltip content={disabled ? t('components.useRecommendedFee') : ''}>
<div className="disabled flex w-80 cursor-not-allowed md:w-96">
<span className="inline-flex items-center px-5 bg-fields-input-primary border-2 border-fields-input-primary rounded-l-full">
<Icon name="verified" />
</span>

<div className="disabled flex cursor-not-allowed md:w-96">
<Form.Item
name="fee"
className="w-full"
Expand All @@ -32,17 +30,25 @@ export const Fee = ({
},
]}
>
<Input
disabled={disabled}
className="mixed-border-input"
id="fee-input"
type="number"
placeholder="Fee network"
value={recommend}
onChange={(event) =>
form.setFieldsValue({ fee: event.target.value })
}
/>
<div className="relative">
<Input
disabled={disabled}
className="sender-custom-input"
id="fee-input"
type="number"
placeholder="Fee network"
value={recommend}
onChange={(event) =>
form.setFieldsValue({ fee: event.target.value })
}
/>
<p className="flex absolute right-[10%] top-[32%] text-xs flex-col items-center justify-center p-0 max-w-xs text-center text-brand-gray200 sm:w-full md:my-4">
<span>
{'≈ '}
{fiatValue}
</span>
</p>
</div>
</Form.Item>
</div>
</Tooltip>
Expand Down
1 change: 1 addition & 0 deletions source/components/Header/AccountHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ export const AccountHeader: React.FC = () => {
const controller = getController();
const isLedger = activeAccount.type === KeyringAccountType.Ledger;
const url = browser.runtime.getURL('app.html');

useEffect(() => {
const placeholder = document.querySelector('.add-identicon');
if (!placeholder) return;
Expand Down
2 changes: 2 additions & 0 deletions source/components/Icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const icons = {
const svgIcons = {
ArrowUpBoldIcon: '../../assets/icons/ArrowUp.svg',
ArrowDownLoad: '../../assets/icons/ArrowDownLoad.svg',
ArrowDown: '/assets/icons/ArrowDown.svg',
ArrowLeft: '../../assets/icons/ArrowLeft.svg',
Close: '../../assets/icons/closeBigger.svg',
EditTx: '/assets/icons/editTx.svg',
Expand All @@ -65,6 +66,7 @@ const svgIcons = {
Trash: '../../assets/icons/trashIcon.svg',
warning: '../../assets/icons/yellowWarn.svg',
Copy: '/assets/icons/copy.svg',
Info: '/assets/icons/info.svg',
};

interface IIcon {
Expand Down
58 changes: 58 additions & 0 deletions source/components/Modal/EditFeeModalBase.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import { Dialog, Transition } from '@headlessui/react';
import React, { Fragment, ReactNode } from 'react';

interface IModal {
children: ReactNode;
className?: string;
onClose?: () => any;
show?: boolean;
}

export const EditFeeModalBase = ({
children,
className = '',
onClose,
show = true,
}: IModal) => (
<Transition appear show={show} as={Fragment}>
<Dialog
as="div"
className={`fixed z-[9999] inset-0 overflow-y-auto ${className}`}
onClose={() => {
if (onClose) onClose();
}}
>
<div className="fixed z-0 -inset-0 w-full bg-brand-black bg-opacity-50 transition-all duration-300 ease-in-out" />

<div className="min-h-screen text-center">
<Transition.Child
as={Fragment}
enter="ease-out duration-300"
enterFrom="opacity-0"
enterTo="opacity-100"
leave="ease-in duration-200"
leaveFrom="opacity-100"
leaveTo="opacity-0"
>
<Dialog.Overlay className="fixed inset-0" />
</Transition.Child>

<span className="inline-block align-middle h-screen" aria-hidden="true">
&#8203;
</span>

<Transition.Child
as={Fragment}
enter="ease-out duration-300"
enterFrom="opacity-0 scale-95"
enterTo="opacity-100 scale-100"
leave="ease-in duration-200"
leaveFrom="opacity-100 scale-100"
leaveTo="opacity-0 scale-95"
>
{children}
</Transition.Child>
</div>
</Dialog>
</Transition>
);
2 changes: 1 addition & 1 deletion source/components/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const Modal = ({
<Transition appear show={show} as={Fragment}>
<Dialog
as="div"
className={`fixed z-10 inset-0 overflow-y-auto ${className}`}
className={`fixed z-[9999] inset-0 overflow-y-auto ${className}`}
onClose={() => {
if (onClose) onClose();
}}
Expand Down
Loading
Loading