-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'twentyhq:main' into main
- Loading branch information
Showing
50 changed files
with
746 additions
and
379 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
5 changes: 0 additions & 5 deletions
5
packages/twenty-front/src/modules/accounts/types/BlockedEmail.ts
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
packages/twenty-front/src/modules/accounts/types/BlocklistItem.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,6 @@ | ||
export type BlocklistItem = { | ||
id: string; | ||
handle: string; | ||
workspaceMemberId: string; | ||
createdAt: string; | ||
}; |
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
47 changes: 28 additions & 19 deletions
47
...y-front/src/modules/settings/accounts/components/SettingsAccountsEmailsBlocklistTable.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 |
---|---|---|
@@ -1,40 +1,49 @@ | ||
import styled from '@emotion/styled'; | ||
|
||
import { BlockedEmail } from '@/accounts/types/BlockedEmail'; | ||
import { BlocklistItem } from '@/accounts/types/BlocklistItem'; | ||
import { SettingsAccountsEmailsBlocklistTableRow } from '@/settings/accounts/components/SettingsAccountsEmailsBlocklistTableRow'; | ||
import { Table } from '@/ui/layout/table/components/Table'; | ||
import { TableBody } from '@/ui/layout/table/components/TableBody'; | ||
import { TableHeader } from '@/ui/layout/table/components/TableHeader'; | ||
import { TableRow } from '@/ui/layout/table/components/TableRow'; | ||
|
||
type SettingsAccountsEmailsBlocklistTableProps = { | ||
blockedEmailList: BlockedEmail[]; | ||
blocklist: BlocklistItem[]; | ||
handleBlockedEmailRemove: (id: string) => void; | ||
}; | ||
|
||
const StyledTable = styled(Table)` | ||
margin-top: ${({ theme }) => theme.spacing(4)}; | ||
`; | ||
|
||
const StyledTableBody = styled(TableBody)` | ||
border-bottom: 1px solid ${({ theme }) => theme.border.color.light}; | ||
`; | ||
|
||
export const SettingsAccountsEmailsBlocklistTable = ({ | ||
blockedEmailList, | ||
blocklist, | ||
handleBlockedEmailRemove, | ||
}: SettingsAccountsEmailsBlocklistTableProps) => { | ||
return ( | ||
<Table> | ||
<TableRow> | ||
<TableHeader>Email/Domain</TableHeader> | ||
<TableHeader>Added to blocklist</TableHeader> | ||
<TableHeader></TableHeader> | ||
</TableRow> | ||
<StyledTableBody> | ||
{blockedEmailList.map((blockedEmail) => ( | ||
<SettingsAccountsEmailsBlocklistTableRow | ||
key={blockedEmail.id} | ||
blockedEmail={blockedEmail} | ||
onRemove={handleBlockedEmailRemove} | ||
/> | ||
))} | ||
</StyledTableBody> | ||
</Table> | ||
<> | ||
{blocklist.length > 0 && ( | ||
<StyledTable> | ||
<TableRow> | ||
<TableHeader>Email/Domain</TableHeader> | ||
<TableHeader>Added to blocklist</TableHeader> | ||
<TableHeader></TableHeader> | ||
</TableRow> | ||
<StyledTableBody> | ||
{blocklist.map((blocklistItem) => ( | ||
<SettingsAccountsEmailsBlocklistTableRow | ||
key={blocklistItem.id} | ||
blocklistItem={blocklistItem} | ||
onRemove={handleBlockedEmailRemove} | ||
/> | ||
))} | ||
</StyledTableBody> | ||
</StyledTable> | ||
)} | ||
</> | ||
); | ||
}; |
17 changes: 10 additions & 7 deletions
17
...ront/src/modules/settings/accounts/components/SettingsAccountsEmailsBlocklistTableRow.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
1 change: 1 addition & 0 deletions
1
packages/twenty-front/src/modules/workspace/types/FeatureFlagKey.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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
export type FeatureFlagKey = | ||
| 'IS_MESSAGING_ENABLED' | ||
| 'IS_BLOCKLIST_ENABLED' | ||
| 'IS_INTEGRATIONS_ENABLED' | ||
| 'IS_QUICK_ACTIONS_ENABLED' | ||
| 'IS_NEW_RECORD_BOARD_ENABLED'; |
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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.