@@ -35,6 +35,7 @@ import {addIslandSuccessNotification} from "@code0-tech/pictor/dist/components/i
3535import { IconAt , IconBackground , IconLock , IconMail , IconSettings2 , IconShieldLock } from "@tabler/icons-react" ;
3636import { Layout } from "@code0-tech/pictor/dist/components/layout/Layout" ;
3737import { motion } from "framer-motion" ;
38+ import { UserSessionsDataTableComponent } from "@edition/user/components/UserSessionsDataTableComponent" ;
3839
3940export interface UserEditDialogComponentProps {
4041 userId ?: User [ 'id' ]
@@ -205,6 +206,12 @@ export const UserEditDialogComponent: React.FC<UserEditDialogComponentProps> = (
205206 < Text size = { "md" } > Security</ Text >
206207 </ Button >
207208 </ TabTrigger >
209+ < TabTrigger value = { "sessions" } w = { "100%" } asChild >
210+ < Button paddingSize = { "xxs" } variant = { "none" } justify = { "start" } >
211+ < IconSettings2 opacity = { 0 } size = { 13 } />
212+ < Text size = { "md" } > Sessions</ Text >
213+ </ Button >
214+ </ TabTrigger >
208215 </ TabList >
209216 < DialogClose asChild style = { { marginTop : "auto" } } >
210217 < Button paddingSize = { "xxs" } w = { "100%" } variant = { "none" }
@@ -264,7 +271,8 @@ export const UserEditDialogComponent: React.FC<UserEditDialogComponentProps> = (
264271 description = { "A short bio or notes shown on the user's profile." }
265272 { ...inputs . getInputProps ( "readme" ) } />
266273 </ TabContent >
267- < TabContent value = { "permissions" } style = { { overflow : "hidden" , display : isSelf ? "none" : undefined } } >
274+ < TabContent value = { "permissions" }
275+ style = { { overflow : "hidden" , display : isSelf ? "none" : undefined } } >
268276 < Flex justify = { "space-between" } align = { "center" } >
269277 < Text size = { "lg" } hierarchy = { "primary" } display = { "block" } > Access</ Text >
270278 < Button paddingSize = { "xxs" } color = { "success" } variant = { "none" }
@@ -322,6 +330,24 @@ export const UserEditDialogComponent: React.FC<UserEditDialogComponentProps> = (
322330 onChange = { ( ) => validate ( "repeatPassword" ) }
323331 { ...inputs . getInputProps ( "repeatPassword" ) } />
324332 </ TabContent >
333+ < TabContent value = { "sessions" }
334+ style = { {
335+ overflow : "hidden" ,
336+ height : "100%" ,
337+ display : "flex" ,
338+ flexDirection : "column"
339+ } } >
340+ < Flex justify = { "space-between" } align = { "center" } >
341+ < Text size = { "lg" } hierarchy = { "primary" } display = { "block" } > Sessions</ Text >
342+ </ Flex >
343+ < Spacing spacing = { "xs" } />
344+ < Text size = { "md" } hierarchy = { "tertiary" } >
345+ Active sign-in sessions for @{ user ?. username ?? "" } . Log out a session to revoke
346+ its access.
347+ </ Text >
348+ < Spacing spacing = { "md" } />
349+ < UserSessionsDataTableComponent userId = { userId } />
350+ </ TabContent >
325351 </ Card >
326352 </ Layout >
327353 </ Tab >
0 commit comments