Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feat/aml' into tmp/20241101
Browse files Browse the repository at this point in the history
  • Loading branch information
dmy147 committed Nov 1, 2024
2 parents 3db9d16 + 22fcee0 commit d19084f
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 7 deletions.
2 changes: 1 addition & 1 deletion _raw/locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2233,7 +2233,7 @@
},
"loginConfirmModal": {
"title": "Log in with Current Address",
"desc": "You can only use this address to deposit and view your GasAccount balance."
"desc": "Once confirmed, you can only deposit it at this address"
},
"logoutConfirmModal": {
"title": "Log out current GasAccount",
Expand Down
33 changes: 31 additions & 2 deletions src/ui/views/GasAccount/components/LoginPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ import { useBrandIcon } from '@/ui/hooks/useBrandIcon';

export const GasACcountCurrentAddress = ({
account,
twoColumn,
}: {
twoColumn?: boolean;
account?: {
address: string;
type: string;
Expand All @@ -34,10 +36,37 @@ export const GasACcountCurrentAddress = ({
brandName: account?.brandName || currentAccount!.brandName,
type: account?.type || currentAccount!.type,
});

if (twoColumn) {
return (
<div className="mb-[20px] h-[56px] px-16 rounded-[6px] flex gap-10 items-center bg-r-neutral-card-2">
<img src={addressTypeIcon} className="w-24 h-24" />
<div className="flex flex-col overflow-hidden">
<span className="text-13 font-medium text-r-neutral-title-1 truncate">
{alias}
</span>
<div className="flex items-center">
<AddressViewer
address={account?.address || currentAccount!.address}
showArrow={false}
className="text-[12px] text-r-neutral-body relative top-1"
/>
<CopyChecked
addr={account?.address || currentAccount!.address}
className={clsx(
'w-[14px] h-[14px] ml-4 text-14 cursor-pointer relative top-1'
)}
checkedClassName={clsx('text-[#00C087]')}
/>
</div>
</div>
</div>
);
}
return (
<div className="mb-[20px] py-12 px-16 rounded-[6px] flex items-center bg-r-neutral-card-2">
<div className="max-w-[calc(100%-40px)] mb-[20px] py-12 px-16 rounded-[6px] flex items-center bg-r-neutral-card-2 overflow-hidden">
<img src={addressTypeIcon} className="w-24 h-24" />
<span className="ml-[8px] mr-4 text-15 font-medium text-r-neutral-title-1">
<span className="ml-[8px] mr-4 text-15 font-medium text-r-neutral-title-1 truncate">
{alias}
</span>
<AddressViewer
Expand Down
7 changes: 3 additions & 4 deletions src/ui/views/GasAccount/components/SwitchLoginAddrModal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { useEffect, useState } from 'react';
import React from 'react';
import { Modal } from '@/ui/component';
import { TokenItem } from '@rabby-wallet/rabby-api/dist/types';
import { useTranslation } from 'react-i18next';
import { Button } from 'antd';
import clsx from 'clsx';
Expand Down Expand Up @@ -43,8 +42,8 @@ export const SwitchLoginAddrBeforeDepositModal = ({
<div className="mt-12 mb-20 text-14 text-r-neutral-body">
{t('page.gasAccount.switchLoginAddressBeforeDeposit.desc')}
</div>
<div className="mb-12">
<GasACcountCurrentAddress account={gasAccount} />
<div className="mb-12 w-full">
<GasACcountCurrentAddress account={gasAccount} twoColumn />
</div>

<Button
Expand Down

0 comments on commit d19084f

Please sign in to comment.