@riligar/auth-react 1.29.0 → 1.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +151 -143
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +150 -142
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useMemo, useEffect, createContext, useState, useRef } from 'react';
|
|
|
3
3
|
import { useShallow } from 'zustand/react/shallow';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import { Navigate, Outlet, useNavigate } from 'react-router-dom';
|
|
6
|
-
import { Modal, Stack, Text, Image, Title, Paper, TextInput, PasswordInput, Anchor, Button, Divider, Group, Center, Loader, Box, Avatar, Collapse,
|
|
6
|
+
import { Modal, Stack, Text, Image, Title, Paper, TextInput, PasswordInput, Anchor, Button, Divider, Group, Center, Loader, Box, Avatar, Collapse, FileButton, Tooltip, ThemeIcon, Badge } from '@mantine/core';
|
|
7
7
|
import { useForm } from '@mantine/form';
|
|
8
8
|
import { IconMail, IconLock, IconArrowRight, IconBrandGoogle, IconBrandGithub, IconUser, IconSend, IconCheck, IconX, IconRefresh, IconPhoto, IconTrash, IconPencil, IconShield, IconKey, IconDevices, IconDeviceMobile, IconLogout, IconUserCircle } from '@tabler/icons-react';
|
|
9
9
|
|
|
@@ -2381,14 +2381,17 @@ function UserProfile({
|
|
|
2381
2381
|
mb: "lg",
|
|
2382
2382
|
children: [/*#__PURE__*/jsx(ThemeIcon, {
|
|
2383
2383
|
size: 36,
|
|
2384
|
-
variant: "
|
|
2384
|
+
variant: "subtle",
|
|
2385
|
+
color: "gray",
|
|
2385
2386
|
children: /*#__PURE__*/jsx(Icon, {
|
|
2386
|
-
size:
|
|
2387
|
+
size: 28,
|
|
2388
|
+
stroke: 1.5
|
|
2387
2389
|
})
|
|
2388
|
-
}), /*#__PURE__*/jsxs(
|
|
2390
|
+
}), /*#__PURE__*/jsxs(Stack, {
|
|
2391
|
+
gap: 0,
|
|
2389
2392
|
children: [/*#__PURE__*/jsx(Text, {
|
|
2390
2393
|
fw: 600,
|
|
2391
|
-
size: "
|
|
2394
|
+
size: "sm",
|
|
2392
2395
|
children: sectionTitle
|
|
2393
2396
|
}), description && /*#__PURE__*/jsx(Text, {
|
|
2394
2397
|
size: "xs",
|
|
@@ -2406,12 +2409,12 @@ function UserProfile({
|
|
|
2406
2409
|
actionLabel,
|
|
2407
2410
|
onClick,
|
|
2408
2411
|
expanded
|
|
2409
|
-
}) => /*#__PURE__*/jsx(
|
|
2410
|
-
|
|
2411
|
-
withBorder: false,
|
|
2412
|
+
}) => /*#__PURE__*/jsx(Box, {
|
|
2413
|
+
py: "xs",
|
|
2412
2414
|
children: /*#__PURE__*/jsxs(Group, {
|
|
2413
2415
|
justify: "space-between",
|
|
2414
2416
|
wrap: "nowrap",
|
|
2417
|
+
align: "center",
|
|
2415
2418
|
children: [/*#__PURE__*/jsxs(Group, {
|
|
2416
2419
|
gap: "xl",
|
|
2417
2420
|
wrap: "nowrap",
|
|
@@ -2420,9 +2423,6 @@ function UserProfile({
|
|
|
2420
2423
|
size: "sm",
|
|
2421
2424
|
c: "dimmed",
|
|
2422
2425
|
w: 100,
|
|
2423
|
-
style: {
|
|
2424
|
-
flexShrink: 0
|
|
2425
|
-
},
|
|
2426
2426
|
children: label
|
|
2427
2427
|
}), /*#__PURE__*/jsx(Box, {
|
|
2428
2428
|
flex: 1,
|
|
@@ -2432,10 +2432,11 @@ function UserProfile({
|
|
|
2432
2432
|
label: actionLabel || action,
|
|
2433
2433
|
position: "left",
|
|
2434
2434
|
children: /*#__PURE__*/jsx(Anchor, {
|
|
2435
|
-
size: "
|
|
2436
|
-
fw:
|
|
2435
|
+
size: "xs",
|
|
2436
|
+
fw: 300,
|
|
2437
2437
|
onClick: onClick,
|
|
2438
|
-
c:
|
|
2438
|
+
c: "gray",
|
|
2439
|
+
underline: "none",
|
|
2439
2440
|
children: expanded ? labels.cancel || 'Cancel' : action
|
|
2440
2441
|
})
|
|
2441
2442
|
})]
|
|
@@ -2465,56 +2466,51 @@ function UserProfile({
|
|
|
2465
2466
|
src: user?.image,
|
|
2466
2467
|
name: user?.name || user?.email,
|
|
2467
2468
|
size: 48,
|
|
2468
|
-
radius: "xl"
|
|
2469
|
-
color
|
|
2469
|
+
radius: "xl"
|
|
2470
|
+
// color="initials"
|
|
2470
2471
|
})
|
|
2471
2472
|
})
|
|
2472
2473
|
}), /*#__PURE__*/jsx(Collapse, {
|
|
2473
2474
|
in: editingSection === 'avatar',
|
|
2474
|
-
children: /*#__PURE__*/jsx(
|
|
2475
|
-
p: "
|
|
2475
|
+
children: /*#__PURE__*/jsx(Paper, {
|
|
2476
|
+
p: "sm",
|
|
2476
2477
|
withBorder: true,
|
|
2478
|
+
radius: "sm",
|
|
2477
2479
|
children: /*#__PURE__*/jsxs(Stack, {
|
|
2478
2480
|
gap: "md",
|
|
2479
2481
|
align: "center",
|
|
2480
|
-
children: [/*#__PURE__*/jsx(
|
|
2481
|
-
|
|
2482
|
-
id: "avatar-upload",
|
|
2482
|
+
children: [/*#__PURE__*/jsx(FileButton, {
|
|
2483
|
+
onChange: handleAvatarFileChange,
|
|
2483
2484
|
accept: "image/*",
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
position: "bottom",
|
|
2491
|
-
children: /*#__PURE__*/jsxs(Box, {
|
|
2492
|
-
onClick: () => document.getElementById('avatar-upload')?.click(),
|
|
2493
|
-
style: {
|
|
2494
|
-
position: 'relative',
|
|
2495
|
-
cursor: 'pointer',
|
|
2496
|
-
borderRadius: '50%'
|
|
2497
|
-
},
|
|
2498
|
-
children: [/*#__PURE__*/jsx(Avatar, {
|
|
2499
|
-
src: avatarPreview || user?.image,
|
|
2500
|
-
name: user?.name || user?.email,
|
|
2501
|
-
size: 100,
|
|
2502
|
-
radius: 100,
|
|
2503
|
-
color: "initials"
|
|
2504
|
-
}), /*#__PURE__*/jsx(ThemeIcon, {
|
|
2505
|
-
size: 32,
|
|
2506
|
-
radius: "xl",
|
|
2507
|
-
color: "blue",
|
|
2485
|
+
children: props => /*#__PURE__*/jsx(Tooltip, {
|
|
2486
|
+
label: labels.clickToChange || 'Clique para alterar',
|
|
2487
|
+
position: "bottom",
|
|
2488
|
+
children: /*#__PURE__*/jsxs(Box, {
|
|
2489
|
+
...props,
|
|
2490
|
+
pos: "relative",
|
|
2508
2491
|
style: {
|
|
2509
|
-
|
|
2492
|
+
cursor: 'pointer'
|
|
2493
|
+
},
|
|
2494
|
+
children: [/*#__PURE__*/jsx(Avatar, {
|
|
2495
|
+
src: avatarPreview || user?.image,
|
|
2496
|
+
name: user?.name || user?.email,
|
|
2497
|
+
size: 80,
|
|
2498
|
+
radius: 80,
|
|
2499
|
+
color: "gray"
|
|
2500
|
+
}), /*#__PURE__*/jsx(ThemeIcon, {
|
|
2501
|
+
size: 26,
|
|
2502
|
+
radius: "xl",
|
|
2503
|
+
color: "gray",
|
|
2504
|
+
pos: "absolute",
|
|
2510
2505
|
bottom: 0,
|
|
2511
2506
|
right: 0,
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2507
|
+
bd: "2px solid body",
|
|
2508
|
+
children: /*#__PURE__*/jsx(IconPhoto, {
|
|
2509
|
+
size: 14,
|
|
2510
|
+
stroke: 1.5
|
|
2511
|
+
})
|
|
2512
|
+
})]
|
|
2513
|
+
})
|
|
2518
2514
|
})
|
|
2519
2515
|
}), /*#__PURE__*/jsx(Text, {
|
|
2520
2516
|
size: "xs",
|
|
@@ -2523,20 +2519,18 @@ function UserProfile({
|
|
|
2523
2519
|
children: labels.avatarHint || `Máximo ${Math.round(maxAvatarSize / 1024)}KB • JPG, PNG, GIF, WebP`
|
|
2524
2520
|
}), /*#__PURE__*/jsxs(Group, {
|
|
2525
2521
|
justify: "center",
|
|
2526
|
-
gap: "
|
|
2527
|
-
children: [user?.image && /*#__PURE__*/jsx(
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
children: labels.remove || 'Remover'
|
|
2539
|
-
})
|
|
2522
|
+
gap: "xs",
|
|
2523
|
+
children: [user?.image && /*#__PURE__*/jsx(Button, {
|
|
2524
|
+
variant: "subtle",
|
|
2525
|
+
color: "gray",
|
|
2526
|
+
size: "xs",
|
|
2527
|
+
onClick: handleRemoveAvatar,
|
|
2528
|
+
loading: loadingUpdateProfile,
|
|
2529
|
+
leftSection: /*#__PURE__*/jsx(IconTrash, {
|
|
2530
|
+
size: 14,
|
|
2531
|
+
stroke: 1.5
|
|
2532
|
+
}),
|
|
2533
|
+
children: labels.remove || 'Remover'
|
|
2540
2534
|
}), /*#__PURE__*/jsx(Button, {
|
|
2541
2535
|
variant: "default",
|
|
2542
2536
|
size: "xs",
|
|
@@ -2546,7 +2540,8 @@ function UserProfile({
|
|
|
2546
2540
|
size: "xs",
|
|
2547
2541
|
loading: loadingUpdateProfile,
|
|
2548
2542
|
leftSection: /*#__PURE__*/jsx(IconCheck, {
|
|
2549
|
-
size: 14
|
|
2543
|
+
size: 14,
|
|
2544
|
+
stroke: 1.5
|
|
2550
2545
|
}),
|
|
2551
2546
|
onClick: handleChangeAvatar,
|
|
2552
2547
|
disabled: !avatarPreview || avatarPreview === user?.image,
|
|
@@ -2566,7 +2561,8 @@ function UserProfile({
|
|
|
2566
2561
|
children: /*#__PURE__*/jsxs(Group, {
|
|
2567
2562
|
gap: "xs",
|
|
2568
2563
|
children: [/*#__PURE__*/jsx(IconPencil, {
|
|
2569
|
-
size:
|
|
2564
|
+
size: 18,
|
|
2565
|
+
stroke: 1.5,
|
|
2570
2566
|
color: "var(--mantine-color-dimmed)"
|
|
2571
2567
|
}), /*#__PURE__*/jsx(Text, {
|
|
2572
2568
|
size: "sm",
|
|
@@ -2575,10 +2571,10 @@ function UserProfile({
|
|
|
2575
2571
|
})
|
|
2576
2572
|
}), /*#__PURE__*/jsx(Collapse, {
|
|
2577
2573
|
in: editingSection === 'name',
|
|
2578
|
-
children: /*#__PURE__*/jsx(
|
|
2579
|
-
p: "
|
|
2580
|
-
|
|
2581
|
-
,
|
|
2574
|
+
children: /*#__PURE__*/jsx(Paper, {
|
|
2575
|
+
p: "sm",
|
|
2576
|
+
withBorder: true,
|
|
2577
|
+
radius: "sm",
|
|
2582
2578
|
children: /*#__PURE__*/jsx("form", {
|
|
2583
2579
|
onSubmit: nameForm.onSubmit(handleChangeName),
|
|
2584
2580
|
children: /*#__PURE__*/jsxs(Stack, {
|
|
@@ -2587,26 +2583,25 @@ function UserProfile({
|
|
|
2587
2583
|
label: labels.name || 'Nome',
|
|
2588
2584
|
placeholder: labels.namePlaceholder || 'Digite seu nome',
|
|
2589
2585
|
leftSection: /*#__PURE__*/jsx(IconUser, {
|
|
2590
|
-
size: 16
|
|
2586
|
+
size: 16,
|
|
2587
|
+
stroke: 1.5
|
|
2591
2588
|
}),
|
|
2592
2589
|
...nameForm.getInputProps('name')
|
|
2593
2590
|
}), /*#__PURE__*/jsxs(Group, {
|
|
2594
2591
|
justify: "flex-end",
|
|
2595
|
-
gap: "
|
|
2592
|
+
gap: "xs",
|
|
2596
2593
|
children: [/*#__PURE__*/jsx(Button, {
|
|
2597
2594
|
variant: "default",
|
|
2598
2595
|
size: "xs",
|
|
2599
2596
|
onClick: () => handleToggleSection('name'),
|
|
2600
|
-
leftSection: /*#__PURE__*/jsx(IconX, {
|
|
2601
|
-
size: 14
|
|
2602
|
-
}),
|
|
2603
2597
|
children: labels.cancel || 'Cancelar'
|
|
2604
2598
|
}), /*#__PURE__*/jsx(Button, {
|
|
2605
2599
|
type: "submit",
|
|
2606
2600
|
size: "xs",
|
|
2607
2601
|
loading: loadingUpdateProfile,
|
|
2608
2602
|
leftSection: /*#__PURE__*/jsx(IconCheck, {
|
|
2609
|
-
size: 14
|
|
2603
|
+
size: 14,
|
|
2604
|
+
stroke: 1.5
|
|
2610
2605
|
}),
|
|
2611
2606
|
children: labels.save || 'Salvar'
|
|
2612
2607
|
})]
|
|
@@ -2625,7 +2620,8 @@ function UserProfile({
|
|
|
2625
2620
|
children: /*#__PURE__*/jsxs(Group, {
|
|
2626
2621
|
gap: "xs",
|
|
2627
2622
|
children: [/*#__PURE__*/jsx(IconMail, {
|
|
2628
|
-
size:
|
|
2623
|
+
size: 18,
|
|
2624
|
+
stroke: 1.5,
|
|
2629
2625
|
color: "var(--mantine-color-dimmed)"
|
|
2630
2626
|
}), /*#__PURE__*/jsx(Text, {
|
|
2631
2627
|
size: "sm",
|
|
@@ -2634,9 +2630,10 @@ function UserProfile({
|
|
|
2634
2630
|
})
|
|
2635
2631
|
}), /*#__PURE__*/jsx(Collapse, {
|
|
2636
2632
|
in: editingSection === 'email',
|
|
2637
|
-
children: /*#__PURE__*/jsx(
|
|
2638
|
-
p: "
|
|
2633
|
+
children: /*#__PURE__*/jsx(Paper, {
|
|
2634
|
+
p: "sm",
|
|
2639
2635
|
withBorder: true,
|
|
2636
|
+
radius: "sm",
|
|
2640
2637
|
children: /*#__PURE__*/jsx("form", {
|
|
2641
2638
|
onSubmit: emailForm.onSubmit(handleChangeEmail),
|
|
2642
2639
|
children: /*#__PURE__*/jsxs(Stack, {
|
|
@@ -2645,26 +2642,25 @@ function UserProfile({
|
|
|
2645
2642
|
label: labels.newEmail || 'Novo Email',
|
|
2646
2643
|
placeholder: labels.newEmailPlaceholder || 'Digite o novo email',
|
|
2647
2644
|
leftSection: /*#__PURE__*/jsx(IconMail, {
|
|
2648
|
-
size: 16
|
|
2645
|
+
size: 16,
|
|
2646
|
+
stroke: 1.5
|
|
2649
2647
|
}),
|
|
2650
2648
|
...emailForm.getInputProps('newEmail')
|
|
2651
2649
|
}), /*#__PURE__*/jsxs(Group, {
|
|
2652
2650
|
justify: "flex-end",
|
|
2653
|
-
gap: "
|
|
2651
|
+
gap: "xs",
|
|
2654
2652
|
children: [/*#__PURE__*/jsx(Button, {
|
|
2655
2653
|
variant: "default",
|
|
2656
2654
|
size: "xs",
|
|
2657
2655
|
onClick: () => handleToggleSection('email'),
|
|
2658
|
-
leftSection: /*#__PURE__*/jsx(IconX, {
|
|
2659
|
-
size: 14
|
|
2660
|
-
}),
|
|
2661
2656
|
children: labels.cancel || 'Cancelar'
|
|
2662
2657
|
}), /*#__PURE__*/jsx(Button, {
|
|
2663
2658
|
type: "submit",
|
|
2664
2659
|
size: "xs",
|
|
2665
2660
|
loading: loadingChangeEmail,
|
|
2666
2661
|
leftSection: /*#__PURE__*/jsx(IconCheck, {
|
|
2667
|
-
size: 14
|
|
2662
|
+
size: 14,
|
|
2663
|
+
stroke: 1.5
|
|
2668
2664
|
}),
|
|
2669
2665
|
children: labels.save || 'Salvar'
|
|
2670
2666
|
})]
|
|
@@ -2693,7 +2689,8 @@ function UserProfile({
|
|
|
2693
2689
|
children: /*#__PURE__*/jsxs(Group, {
|
|
2694
2690
|
gap: "xs",
|
|
2695
2691
|
children: [/*#__PURE__*/jsx(IconKey, {
|
|
2696
|
-
size:
|
|
2692
|
+
size: 18,
|
|
2693
|
+
stroke: 1.5,
|
|
2697
2694
|
color: "var(--mantine-color-dimmed)"
|
|
2698
2695
|
}), /*#__PURE__*/jsx(Text, {
|
|
2699
2696
|
size: "sm",
|
|
@@ -2703,9 +2700,10 @@ function UserProfile({
|
|
|
2703
2700
|
})
|
|
2704
2701
|
}), /*#__PURE__*/jsx(Collapse, {
|
|
2705
2702
|
in: editingSection === 'password',
|
|
2706
|
-
children: /*#__PURE__*/jsx(
|
|
2707
|
-
p: "
|
|
2703
|
+
children: /*#__PURE__*/jsx(Paper, {
|
|
2704
|
+
p: "sm",
|
|
2708
2705
|
withBorder: true,
|
|
2706
|
+
radius: "sm",
|
|
2709
2707
|
children: /*#__PURE__*/jsx("form", {
|
|
2710
2708
|
onSubmit: passwordForm.onSubmit(handleChangePassword),
|
|
2711
2709
|
children: /*#__PURE__*/jsxs(Stack, {
|
|
@@ -2730,16 +2728,14 @@ function UserProfile({
|
|
|
2730
2728
|
variant: "default",
|
|
2731
2729
|
size: "xs",
|
|
2732
2730
|
onClick: () => handleToggleSection('password'),
|
|
2733
|
-
leftSection: /*#__PURE__*/jsx(IconX, {
|
|
2734
|
-
size: 14
|
|
2735
|
-
}),
|
|
2736
2731
|
children: labels.cancel || 'Cancelar'
|
|
2737
2732
|
}), /*#__PURE__*/jsx(Button, {
|
|
2738
2733
|
type: "submit",
|
|
2739
2734
|
size: "xs",
|
|
2740
2735
|
loading: loadingChangePassword,
|
|
2741
2736
|
leftSection: /*#__PURE__*/jsx(IconCheck, {
|
|
2742
|
-
size: 14
|
|
2737
|
+
size: 14,
|
|
2738
|
+
stroke: 1.5
|
|
2743
2739
|
}),
|
|
2744
2740
|
children: labels.save || 'Salvar'
|
|
2745
2741
|
})]
|
|
@@ -2758,7 +2754,8 @@ function UserProfile({
|
|
|
2758
2754
|
children: /*#__PURE__*/jsxs(Group, {
|
|
2759
2755
|
gap: "xs",
|
|
2760
2756
|
children: [/*#__PURE__*/jsx(IconDevices, {
|
|
2761
|
-
size:
|
|
2757
|
+
size: 18,
|
|
2758
|
+
stroke: 1.5,
|
|
2762
2759
|
color: "var(--mantine-color-dimmed)"
|
|
2763
2760
|
}), /*#__PURE__*/jsx(Text, {
|
|
2764
2761
|
size: "sm",
|
|
@@ -2768,62 +2765,62 @@ function UserProfile({
|
|
|
2768
2765
|
})
|
|
2769
2766
|
}), /*#__PURE__*/jsx(Collapse, {
|
|
2770
2767
|
in: editingSection === 'sessions',
|
|
2771
|
-
children: /*#__PURE__*/jsx(
|
|
2772
|
-
p: "
|
|
2768
|
+
children: /*#__PURE__*/jsx(Paper, {
|
|
2769
|
+
p: "sm",
|
|
2773
2770
|
withBorder: true,
|
|
2771
|
+
radius: "sm",
|
|
2774
2772
|
children: /*#__PURE__*/jsx(Stack, {
|
|
2775
|
-
gap: "
|
|
2773
|
+
gap: "xs",
|
|
2776
2774
|
children: loadingListSessions ? /*#__PURE__*/jsx(Text, {
|
|
2777
|
-
size: "
|
|
2775
|
+
size: "xs",
|
|
2778
2776
|
c: "dimmed",
|
|
2779
2777
|
ta: "center",
|
|
2778
|
+
py: "md",
|
|
2780
2779
|
children: labels.loadingSessions || 'Carregando sessões...'
|
|
2781
2780
|
}) : sessions.length === 0 ? /*#__PURE__*/jsx(Text, {
|
|
2782
|
-
size: "
|
|
2781
|
+
size: "xs",
|
|
2783
2782
|
c: "dimmed",
|
|
2784
2783
|
ta: "center",
|
|
2784
|
+
py: "md",
|
|
2785
2785
|
children: labels.noSessionsFound || 'Nenhuma sessão encontrada'
|
|
2786
2786
|
}) : /*#__PURE__*/jsxs(Fragment, {
|
|
2787
2787
|
children: [sessions.map(sessionItem => {
|
|
2788
2788
|
const isCurrentSession = sessionItem.id === currentSession?.id;
|
|
2789
2789
|
const deviceInfo = parseUserAgent(sessionItem.userAgent);
|
|
2790
2790
|
const createdDate = new Date(sessionItem.createdAt);
|
|
2791
|
-
return /*#__PURE__*/jsx(
|
|
2792
|
-
p: "
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
},
|
|
2791
|
+
return /*#__PURE__*/jsx(Paper, {
|
|
2792
|
+
p: "xs",
|
|
2793
|
+
withBorder: isCurrentSession,
|
|
2794
|
+
bd: isCurrentSession ? '1px solid gray' : undefined,
|
|
2795
|
+
radius: "sm",
|
|
2797
2796
|
children: /*#__PURE__*/jsxs(Group, {
|
|
2798
2797
|
justify: "space-between",
|
|
2799
2798
|
wrap: "nowrap",
|
|
2799
|
+
align: "center",
|
|
2800
2800
|
children: [/*#__PURE__*/jsxs(Group, {
|
|
2801
2801
|
gap: "sm",
|
|
2802
2802
|
wrap: "nowrap",
|
|
2803
|
-
|
|
2804
|
-
flex: 1
|
|
2805
|
-
},
|
|
2803
|
+
flex: 1,
|
|
2806
2804
|
children: [/*#__PURE__*/jsx(ThemeIcon, {
|
|
2807
|
-
size:
|
|
2808
|
-
variant: "
|
|
2809
|
-
color:
|
|
2805
|
+
size: 32,
|
|
2806
|
+
variant: "subtle",
|
|
2807
|
+
color: "gray",
|
|
2810
2808
|
children: /*#__PURE__*/jsx(IconDeviceMobile, {
|
|
2811
|
-
size: 18
|
|
2809
|
+
size: 18,
|
|
2810
|
+
stroke: 1.5
|
|
2812
2811
|
})
|
|
2813
2812
|
}), /*#__PURE__*/jsxs(Box, {
|
|
2814
|
-
|
|
2815
|
-
flex: 1
|
|
2816
|
-
},
|
|
2813
|
+
flex: 1,
|
|
2817
2814
|
children: [/*#__PURE__*/jsxs(Group, {
|
|
2818
2815
|
gap: "xs",
|
|
2819
2816
|
children: [/*#__PURE__*/jsx(Text, {
|
|
2820
|
-
size: "
|
|
2821
|
-
fw:
|
|
2817
|
+
size: "xs",
|
|
2818
|
+
fw: 600,
|
|
2822
2819
|
children: deviceInfo.browser
|
|
2823
2820
|
}), isCurrentSession && /*#__PURE__*/jsx(Badge, {
|
|
2824
2821
|
size: "xs",
|
|
2825
|
-
variant: "
|
|
2826
|
-
color: "
|
|
2822
|
+
variant: "light",
|
|
2823
|
+
color: "gray",
|
|
2827
2824
|
children: labels.thisDevice || 'Este dispositivo'
|
|
2828
2825
|
})]
|
|
2829
2826
|
}), /*#__PURE__*/jsxs(Text, {
|
|
@@ -2842,13 +2839,14 @@ function UserProfile({
|
|
|
2842
2839
|
}), /*#__PURE__*/jsx(Tooltip, {
|
|
2843
2840
|
label: isCurrentSession ? labels.signOutAndEnd || 'Encerrar e sair' : labels.endSession || 'Encerrar sessão',
|
|
2844
2841
|
children: /*#__PURE__*/jsx(Button, {
|
|
2845
|
-
variant: "
|
|
2846
|
-
color: "
|
|
2842
|
+
variant: "subtle",
|
|
2843
|
+
color: "gray",
|
|
2847
2844
|
size: "xs",
|
|
2848
2845
|
onClick: () => handleRevokeSession(sessionItem.id),
|
|
2849
2846
|
loading: loadingRevokeSession === sessionItem.id,
|
|
2850
2847
|
leftSection: /*#__PURE__*/jsx(IconLogout, {
|
|
2851
|
-
size: 14
|
|
2848
|
+
size: 14,
|
|
2849
|
+
stroke: 1.5
|
|
2852
2850
|
}),
|
|
2853
2851
|
children: labels.end || 'Encerrar'
|
|
2854
2852
|
})
|
|
@@ -2857,14 +2855,16 @@ function UserProfile({
|
|
|
2857
2855
|
}, sessionItem.id);
|
|
2858
2856
|
}), sessions.length > 1 && /*#__PURE__*/jsx(Group, {
|
|
2859
2857
|
justify: "flex-end",
|
|
2858
|
+
mt: "xs",
|
|
2860
2859
|
children: /*#__PURE__*/jsx(Button, {
|
|
2861
|
-
variant: "
|
|
2862
|
-
color: "
|
|
2860
|
+
variant: "subtle",
|
|
2861
|
+
color: "gray",
|
|
2863
2862
|
size: "xs",
|
|
2864
2863
|
onClick: handleRevokeOtherSessions,
|
|
2865
2864
|
loading: loadingRevokeSession === 'all',
|
|
2866
2865
|
leftSection: /*#__PURE__*/jsx(IconLogout, {
|
|
2867
|
-
size: 14
|
|
2866
|
+
size: 14,
|
|
2867
|
+
stroke: 1.5
|
|
2868
2868
|
}),
|
|
2869
2869
|
children: labels.endOtherSessions || 'Encerrar todas as outras sessões'
|
|
2870
2870
|
})
|
|
@@ -2883,27 +2883,31 @@ function UserProfile({
|
|
|
2883
2883
|
return /*#__PURE__*/jsxs(Modal, {
|
|
2884
2884
|
opened: opened,
|
|
2885
2885
|
onClose: onClose,
|
|
2886
|
-
size: width
|
|
2886
|
+
size: width,
|
|
2887
2887
|
withCloseButton: true,
|
|
2888
2888
|
radius: "md",
|
|
2889
2889
|
overlayProps: {
|
|
2890
|
-
backgroundOpacity: 0.
|
|
2891
|
-
blur:
|
|
2890
|
+
backgroundOpacity: 0.5,
|
|
2891
|
+
blur: 4
|
|
2892
2892
|
},
|
|
2893
2893
|
title: /*#__PURE__*/jsxs(Group, {
|
|
2894
|
-
gap: "
|
|
2894
|
+
gap: "sm",
|
|
2895
2895
|
children: [/*#__PURE__*/jsx(ThemeIcon, {
|
|
2896
|
-
size:
|
|
2897
|
-
variant: "
|
|
2896
|
+
size: 32,
|
|
2897
|
+
variant: "subtle",
|
|
2898
|
+
color: "gray",
|
|
2898
2899
|
children: /*#__PURE__*/jsx(IconUserCircle, {
|
|
2899
|
-
size: 24
|
|
2900
|
+
size: 24,
|
|
2901
|
+
stroke: 1.5
|
|
2900
2902
|
})
|
|
2901
|
-
}), /*#__PURE__*/jsxs(
|
|
2903
|
+
}), /*#__PURE__*/jsxs(Stack, {
|
|
2904
|
+
gap: 0,
|
|
2902
2905
|
children: [/*#__PURE__*/jsx(Title, {
|
|
2903
|
-
order:
|
|
2906
|
+
order: 5,
|
|
2907
|
+
fw: 600,
|
|
2904
2908
|
children: title
|
|
2905
2909
|
}), /*#__PURE__*/jsx(Text, {
|
|
2906
|
-
size: "
|
|
2910
|
+
size: "xs",
|
|
2907
2911
|
c: "dimmed",
|
|
2908
2912
|
children: subtitle
|
|
2909
2913
|
})]
|
|
@@ -2928,24 +2932,28 @@ function UserProfile({
|
|
|
2928
2932
|
children: /*#__PURE__*/jsxs(Stack, {
|
|
2929
2933
|
gap: "sm",
|
|
2930
2934
|
children: [/*#__PURE__*/jsxs(Group, {
|
|
2931
|
-
gap: "
|
|
2935
|
+
gap: "sm",
|
|
2932
2936
|
children: [logo ? /*#__PURE__*/jsx(Image, {
|
|
2933
2937
|
src: logo,
|
|
2934
2938
|
alt: "Auth",
|
|
2935
2939
|
h: logoHeight,
|
|
2936
2940
|
fit: "contain"
|
|
2937
2941
|
}) : /*#__PURE__*/jsx(ThemeIcon, {
|
|
2938
|
-
size:
|
|
2939
|
-
variant: "
|
|
2942
|
+
size: 32,
|
|
2943
|
+
variant: "subtle",
|
|
2944
|
+
color: "gray",
|
|
2940
2945
|
children: /*#__PURE__*/jsx(IconUserCircle, {
|
|
2941
|
-
size: 24
|
|
2946
|
+
size: 24,
|
|
2947
|
+
stroke: 1.5
|
|
2942
2948
|
})
|
|
2943
|
-
}), /*#__PURE__*/jsxs(
|
|
2949
|
+
}), /*#__PURE__*/jsxs(Stack, {
|
|
2950
|
+
gap: 0,
|
|
2944
2951
|
children: [/*#__PURE__*/jsx(Title, {
|
|
2945
|
-
order:
|
|
2952
|
+
order: 5,
|
|
2953
|
+
fw: 600,
|
|
2946
2954
|
children: title
|
|
2947
2955
|
}), /*#__PURE__*/jsx(Text, {
|
|
2948
|
-
size: "
|
|
2956
|
+
size: "xs",
|
|
2949
2957
|
c: "dimmed",
|
|
2950
2958
|
children: subtitle
|
|
2951
2959
|
})]
|