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

Feature/v2.17.0 #370

Open
wants to merge 8 commits into
base: feature/v2.17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions packages/did-ui-react/src/assets/svgIcon/Add.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 2 additions & 15 deletions packages/did-ui-react/src/assets/svgIcon/Down.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 packages/did-ui-react/src/assets/svgIcon/Remove.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion packages/did-ui-react/src/assets/svgs.ts

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions packages/did-ui-react/src/assets/theme/modified.antd.css
Original file line number Diff line number Diff line change
Expand Up @@ -16883,11 +16883,11 @@ textarea.portkey-ant-input-number {
position: relative;
display: inline-block;
box-sizing: border-box;
min-width: 44px;
height: 22px;
line-height: 22px;
min-width: 40px;
height: 24px;
line-height: 24px;
vertical-align: middle;
background-color: rgba(0, 0, 0, 0.25);
background-color: var(--sds-color-background-neutral-secondary);
border: 0;
border-radius: 100px;
cursor: pointer;
Expand All @@ -16909,7 +16909,7 @@ textarea.portkey-ant-input-number {
}

.portkey-ant-switch-checked {
background-color: var(--portkey-ant-primary-color);
background-color: var(--sds-color-background-brand-tertiary);
}

.portkey-ant-switch-loading,
Expand Down Expand Up @@ -16938,7 +16938,7 @@ textarea.portkey-ant-input-number {

.portkey-ant-switch-handle {
position: absolute;
top: 2px;
top: 3px;
left: 2px;
width: 18px;
height: 18px;
Expand Down
6 changes: 5 additions & 1 deletion packages/did-ui-react/src/components/CommonSelect/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,23 @@
flex-shrink: 0;
border-radius: var(--portkey-ui-rounded-full);
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
& > .portkey-ui-custom-svg,
& > img {
height: 100%;
width: 100%;
}
& > img {
vertical-align: initial;
width: 16px;
height: 16px;
}
}
.title {
color: var(--portkey-ui-text-primary);
font-size: 16px;
margin-left: 12px;
}
}
}
Expand Down
27 changes: 18 additions & 9 deletions packages/did-ui-react/src/components/Guardian/index.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ function GuardianMain({
chainType,
sandboxId,
});
_guardianList.reverse();
setGuardianList(_guardianList);
return _guardianList;
} catch (error) {
Expand Down Expand Up @@ -324,31 +323,35 @@ function GuardianMain({
const renderBackHeaderLeftEle = useCallback(
(goBack?: () => void) => (
<div className="portkey-ui-guardian-left portkey-ui-flex-center">
<CustomSvg type="LeftArrow" onClick={goBack} />
Guardians
<div className="left-icon" onClick={onBack}>
<CustomSvg type="ArrowLeft" fillColor="var(--sds-color-icon-default-default)" onClick={goBack} />
</div>
</div>
),
[],
);

//<CustomSvg className="portkey-ui-enter-btn" type="ChevronRight" style={{ width: 16, height: 16 }} />

return (
<div className={clsx('portkey-ui-guardian-page', className)}>
{step === GuardianStep.guardianList && (
<GuardianList
header={
<BackHeaderForPage
leftElement={renderBackHeaderLeftEle(onBack)}
title={<>Guardians</>}
rightElement={
<ThrottleButton
<div
onClick={() => {
if (!isLoginOnChain) {
return loadingTip({ msg: loginOptTip });
}
onAddGuardian();
}}
className="title-add-guardian-btn">
Add Guardians
</ThrottleButton>
<CustomSvg type="Add" style={{ width: 24, height: 24 }} />
</div>
}
/>
}
Expand All @@ -358,7 +361,7 @@ function GuardianMain({
)}
{step === GuardianStep.guardianView && (
<GuardianView
header={<BackHeaderForPage leftElement={renderBackHeaderLeftEle(onGoBackList)} />}
header={<BackHeaderForPage leftElement={renderBackHeaderLeftEle(onGoBackList)} title={'Guardian Details'} />}
originChainId={originChainId}
currentGuardian={currentGuardian!}
onEditGuardian={editable ? onEditGuardian : undefined}
Expand All @@ -370,7 +373,7 @@ function GuardianMain({
)}
{step === GuardianStep.guardianAdd && (
<GuardianAdd
header={<BackHeaderForPage leftElement={renderBackHeaderLeftEle(onGoBackList)} />}
header={<BackHeaderForPage leftElement={renderBackHeaderLeftEle(onGoBackList)} title={'Add Guardian'} />}
caHash={caHash}
originChainId={originChainId}
networkType={networkType}
Expand All @@ -383,7 +386,13 @@ function GuardianMain({
)}
{step === GuardianStep.guardianEdit && (
<GuardianEdit
header={<BackHeaderForPage leftElement={renderBackHeaderLeftEle(onGoView)} />}
header={
<BackHeaderForPage
leftElement={renderBackHeaderLeftEle(onGoView)}
title={'Edit Guardian'}
rightElement={<CustomSvg className="remove-icon" type="Remove" fillColor="#111111" />}
/>
}
originChainId={originChainId}
caHash={caHash}
networkType={networkType}
Expand Down
45 changes: 36 additions & 9 deletions packages/did-ui-react/src/components/Guardian/index.less
Original file line number Diff line number Diff line change
@@ -1,27 +1,54 @@
@import '../../assets/theme/constants.less';
.portkey-ui-guardian-page {
height: 100%;
.back-header-page-wrapper {
background-color: var(--portkey-ui-default-bg);
border-bottom: 1px solid var(--portkey-ui-border-2);
background-color: var(--sds-color-background-default-default);
// border-bottom: 1px solid var(--portkey-ui-border-2);
.title-center {
font-size: 16px;
}
.portkey-ui-custom-svg {
width: auto;
height: auto;
}

.title-left-col {
cursor: auto;
.leftarrow-icon {
.left-icon {
cursor: pointer;
svg {
width: 16px;
height: 16px;
}
}
}
.portkey-ui-guardian-left {
gap: 12px;
line-height: 28px;
font-size: 24px;
font-size: 16px;
color: var(--portkey-ui-text-primary);
text-align: left;
}
.title-add-guardian-btn {
padding: 12px 8px;
border-radius: var(--portkey-ui-primary-border-radius);
border: 1px solid var(--portkey-ui-border-7);

.title-right-col .add-icon svg {
width: 24px!important;
height: 24px!important;
}

.title-right-col .remove-icon svg {
width: 24px!important;
height: 24px!important;
}
// .title-add-guardian-btn {
// width: 24px;
// height: 24px;
// .add-icon svg {
// width: 24px!important;
// height: 24px!important;
// }
// padding: 12px 8px;
// border-radius: var(--portkey-ui-primary-border-radius);
// border: 1px solid var(--portkey-ui-border-7);
// }

@media screen and (max-width: 768px) {
.portkey-ui-guardian-left {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
width: 0; // responsive placeholder, to fix overflow
color: var(--portkey-ui-font-7);
word-wrap: break-word;
margin-left: 12px;
text-align: right
}

.account-text-one-row {
Expand All @@ -15,6 +15,8 @@
.account-text-two-row {
.social-guardian-name {
.text-overflow(1);
color: var(--portkey-ui-text-primary);

}
.social-guardian-detail {
font-size: 12px;
Expand Down
32 changes: 24 additions & 8 deletions packages/did-ui-react/src/components/GuardianAdd/index.less
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
@import '../../assets/theme/constants.less';


.portkey-ui-guardian-add {
height: 100%;
.guardian-add-body {
padding: 24px;
padding: 0 24px;
font-size: 14px;
line-height: 20px;
gap: 24px;
Expand All @@ -12,20 +13,20 @@
margin-bottom: 8px;
}
.social-input {
padding: 14px 16px;
padding: 6px 16px;
border-radius: 6px;
border: 1px solid var(--portkey-ui-default-border);
.social-name {
color: var(--portkey-ui-font-6);
color: var(--portkey-ui-text-primary);
}
.social-email {
font-size: 12px;
line-height: 16px;
color: var(--portkey-ui-font-6-8);
font-size: 16px;
line-height: 24px;
color: var(--portkey-ui-text-primary);
}
.social-click-text {
font-weight: 500;
color: var(--portkey-ui-font-13);
color: var(--sds-color-text-brand-default);
cursor: pointer;
}
&.detail {
Expand All @@ -43,6 +44,12 @@
}
}

.portkey-ant-select-selector {
background-color: transparent!important;
border: 1px solid var(--sds-color-border-default-default)!important;
border-radius: 8px!important;
}

.verifier-select.verifier-select-disabled {
pointer-events: none;
.portkey-ant-select-selector {
Expand All @@ -51,10 +58,11 @@
}
}
.guardian-add-footer {
width: 100%;
margin-top: 16px;
padding: 16px;
border-top: 1px solid var(--portkey-ui-default-border);
.guardian-btn {
width: 100%;
padding: 0 16px;
line-height: var(--portkey-ui-default-btn-h);
border-radius: var(--portkey-ui-primary-border-radius);
Expand All @@ -73,6 +81,14 @@
color: var(--portkey-ui-font-9);
font-size: 12px;
}
.base-guardian-type-icon {
width: 16px!important;
height: 16px!important;
.portkey-ui-custom-svg svg{
width: 8px!important;
height: 8px!important;
}
}
}
.portkey-ui-remove-guardian-modal {
gap: 8px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import './index.less';
import { Open_Login_Bridge } from '../../constants/telegram';
import { getCustomNetworkType, getStorageInstance } from '../config-provider/utils';
import { useAsyncVerifyToken, VerifySocialLoginParams } from '../../hooks/authenticationAsync';
import CustomSvg from '../CustomSvg';

const getExpiredTime = () => Date.now() + HOUR - 2 * MINUTE;

Expand Down Expand Up @@ -183,8 +184,13 @@ const GuardianApprovalMain = forwardRef(
: {};
if (isFirstShowWarning !== SHOW_WARNING_DIALOG && !accessToken) {
const isConfirm = await modalMethod({
width: 320,
title: <div className="security-notice">Security Notice</div>,
width: 400,
title: (
<div>
{/* <CustomSvg className="warning-info" type="WarningInfo" /> */}
<div className="security-notice">Security Notice</div>
</div>
),
closable: false,
wrapClassName: 'warning-modal-wrapper',
className: `portkey-ui-common-modals ` + 'confirm-return-modal',
Expand Down
Loading
Loading