Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b3abc61

Browse files
committed
add active indicator in the workspaces page
1 parent 2f291f7 commit b3abc61

File tree

1 file changed

+11
-1
lines changed
  • client/packages/lowcoder/src/pages/setting/organization

1 file changed

+11
-1
lines changed

‎client/packages/lowcoder/src/pages/setting/organization/orgList.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ADMIN_ROLE, SUPER_ADMIN_ROLE } from "constants/orgConstants";
2-
import { AddIcon, CustomModal, DangerIcon, EditPopover, SearchIcon } from "lowcoder-design";
2+
import { AddIcon, CustomModal, DangerIcon, EditPopover, SearchIcon, CheckoutIcon } from "lowcoder-design";
33
import { useDispatch, useSelector } from "react-redux";
44
import { createOrgAction, deleteOrgAction } from "redux/reduxActions/orgActions";
55
import styled from "styled-components";
@@ -50,6 +50,14 @@ const OrgName = styled.div`
5050
}
5151
`;
5252

53+
// Icon to indicate the currently active organization
54+
const ActiveOrgIcon = styled(CheckoutIcon)`
55+
width: 16px;
56+
height: 16px;
57+
color: #4965f2;
58+
margin-left: 6px;
59+
`;
60+
5361
const TableStyled = styled(Table)`
5462
.ant-table-tbody > tr > td {
5563
padding: 11px 12px;
@@ -239,10 +247,12 @@ function OrganizationSetting() {
239247
dataIndex: "orgName",
240248
ellipsis: true,
241249
render: (_, record: any) => {
250+
const isActiveOrg = record.id === user.currentOrgId;
242251
return (
243252
<OrgName>
244253
<StyledOrgLogo source={record.logoUrl} orgName={record.orgName} />
245254
<span>{record.orgName}</span>
255+
{isActiveOrg && <ActiveOrgIcon />}
246256
</OrgName>
247257
);
248258
},

0 commit comments

Comments
 (0)