-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui): [Frontend] Multi-sig IPEX: Group Status in Credential Issua…
…nce (#783) * feat(ui): issue group credential * fix(ui): fix group member on android UI * fix(ui): group member status in small device * fix(ui): add credential when reach threshold * fix(ui): update pending screen and improve ux when loading page * fix(ui): fix UT * feat(ui): change member component to share component * fix(core): remove notification after credential has confirmed (#787) * fix(core): remove notification after credential has confirmed * fix: resolve comment * fix: update unittest for AppWrapper * fix: update unittest for emit event NotificationRemoved * fix(ui): remove unsupported method --------- Co-authored-by: Vu Van Duc <[email protected]> Co-authored-by: Bao Hoang <[email protected]>
- Loading branch information
1 parent
8e3a8dc
commit bc9c736
Showing
18 changed files
with
589 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
src/ui/pages/NotificationDetails/components/MultisigMember/MultisigMember.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
.member { | ||
--padding-start: 0; | ||
--inner-padding-end: 0; | ||
--padding-top: 0.75rem; | ||
--padding-bottom: 0.75rem; | ||
--min-height: auto; | ||
|
||
.member-avatar { | ||
width: 1.5rem; | ||
height: 1.5rem; | ||
} | ||
|
||
.member-name { | ||
width: 70%; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
font-weight: 500; | ||
font-size: 1rem; | ||
|
||
&.md { | ||
margin-inline-end: 0; | ||
} | ||
} | ||
|
||
.status { | ||
border-radius: 50%; | ||
padding: 0.3125rem; | ||
width: 0.875rem; | ||
height: 0.875rem; | ||
|
||
&.accepted { | ||
background: var(--ion-color-primary-gradient); | ||
} | ||
|
||
&.rejected { | ||
background: #ff7d7a; | ||
} | ||
|
||
&.waiting { | ||
background: rgba(var(--ion-color-dark-grey-rgb), 0.5); | ||
} | ||
} | ||
|
||
@media screen and (min-width: 250px) and (max-width: 370px) { | ||
--padding-top: 0.5rem; | ||
--padding-bottom: 0.5rem; | ||
|
||
.member-name { | ||
font-size: 0.875rem; | ||
} | ||
|
||
.status { | ||
padding: 0.125rem; | ||
width: 0.675rem; | ||
height: 0.675rem; | ||
|
||
&.md { | ||
margin-inline-start: 0; | ||
} | ||
} | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
src/ui/pages/NotificationDetails/components/MultisigMember/MultisigMember.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { IonIcon, IonItem, IonText } from "@ionic/react"; | ||
import { checkmark, closeOutline, hourglassOutline } from "ionicons/icons"; | ||
import { useMemo } from "react"; | ||
import KeriLogo from "../../../../assets/images/KeriGeneric.jpg"; | ||
import { combineClassNames } from "../../../../utils/style"; | ||
import "./MultisigMember.scss"; | ||
import { MemberAcceptStatus, MemberProps } from "./MultisigMember.types"; | ||
|
||
const MultisigMember = ({ name, status }: MemberProps) => { | ||
const statusClasses = combineClassNames("status", { | ||
accepted: status === MemberAcceptStatus.Accepted, | ||
waiting: status === MemberAcceptStatus.Waiting, | ||
rejected: status === MemberAcceptStatus.Rejected, | ||
}); | ||
|
||
const icon = useMemo(() => { | ||
switch (status) { | ||
case MemberAcceptStatus.Accepted: | ||
return checkmark; | ||
case MemberAcceptStatus.Rejected: | ||
return closeOutline; | ||
default: | ||
return hourglassOutline; | ||
} | ||
}, [status]); | ||
|
||
return ( | ||
<IonItem | ||
lines="none" | ||
className="member" | ||
> | ||
<img | ||
className="member-avatar" | ||
slot="start" | ||
src={KeriLogo} | ||
alt="keri" | ||
/> | ||
<IonText | ||
slot="start" | ||
className="member-name" | ||
> | ||
{name} | ||
</IonText> | ||
<IonIcon | ||
slot="end" | ||
icon={icon} | ||
className={statusClasses} | ||
/> | ||
</IonItem> | ||
); | ||
}; | ||
|
||
export { MultisigMember }; |
14 changes: 14 additions & 0 deletions
14
src/ui/pages/NotificationDetails/components/MultisigMember/MultisigMember.types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
enum MemberAcceptStatus { | ||
Accepted, | ||
Waiting, | ||
Rejected, | ||
} | ||
|
||
interface MemberProps { | ||
name: string; | ||
status: MemberAcceptStatus; | ||
} | ||
|
||
export type { MemberProps }; | ||
|
||
export { MemberAcceptStatus }; |
2 changes: 2 additions & 0 deletions
2
src/ui/pages/NotificationDetails/components/MultisigMember/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from "./MultisigMember"; | ||
export * from "./MultisigMember.types"; |
Oops, something went wrong.