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

AdminID #598

Merged
merged 7 commits into from
Nov 1, 2024
Merged
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
43 changes: 41 additions & 2 deletions apps/dashboard/src/pages/group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ export default function GroupPage(): JSX.Element {
const { hasCopied: hasCopiedGroupId, onCopy: onCopyGroupId } = useClipboard(
groupId || ""
)
const { hasCopied: hasCopiedAdminId, onCopy: onCopyAdminId } = useClipboard(
(_group && _group.admin) || ""
)
const [_searchMember, setSearchMember] = useState<string>("")
const [_removeGroupName, setRemoveGroupName] = useState<string>("")
const [_selectedMembers, setSelectedMembers] = useState<string[]>([])
Expand Down Expand Up @@ -453,15 +456,13 @@ ${memberIds.join("\n")}
borderRadius="8px"
>
<Text fontSize="20px">Group ID</Text>

<InputGroup size="lg" mt="10px">
<Input
pr="50px"
placeholder="Group ID"
value={groupId}
isDisabled
/>

<InputRightElement mr="5px">
<Tooltip
label={
Expand All @@ -487,6 +488,44 @@ ${memberIds.join("\n")}
</InputRightElement>
</InputGroup>
</Box>
<Box
bgColor="balticSea.50"
p="25px 30px 25px 30px"
borderRadius="8px"
>
<Text fontSize="20px">Admin ID</Text>
<InputGroup size="lg" mt="10px">
<Input
pr="50px"
placeholder="Admin ID"
value={_group.admin}
isDisabled
/>
<InputRightElement mr="5px">
<Tooltip
label={
hasCopiedAdminId ? "Copied!" : "Copy"
}
closeOnClick={false}
hasArrow
>
<IconButton
variant="link"
aria-label="Copy Group id"
onClick={onCopyAdminId}
onMouseDown={(e) => e.preventDefault()}
icon={
<Icon
color="sunsetOrange.600"
boxSize="5"
as={FiCopy}
/>
}
/>
</Tooltip>
</InputRightElement>
</InputGroup>
</Box>
)
{groupType === "off-chain" && _group.credentials && (
<Box
Expand Down
Loading