@hed-hog/core 0.0.296 → 0.0.298
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/auth/auth.controller.d.ts +14 -14
- package/dist/auth/auth.service.d.ts +14 -14
- package/dist/challenge/challenge.service.d.ts +2 -2
- package/dist/dashboard/dashboard-core/dashboard-core.controller.d.ts +15 -1
- package/dist/dashboard/dashboard-core/dashboard-core.controller.d.ts.map +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.controller.js +9 -0
- package/dist/dashboard/dashboard-core/dashboard-core.controller.js.map +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.module.d.ts.map +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.module.js +6 -1
- package/dist/dashboard/dashboard-core/dashboard-core.module.js.map +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.service.d.ts +175 -3
- package/dist/dashboard/dashboard-core/dashboard-core.service.d.ts.map +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.service.js +531 -5
- package/dist/dashboard/dashboard-core/dashboard-core.service.js.map +1 -1
- package/dist/file/file.controller.d.ts.map +1 -1
- package/dist/file/file.controller.js +16 -0
- package/dist/file/file.controller.js.map +1 -1
- package/dist/file/file.service.d.ts +7 -1
- package/dist/file/file.service.d.ts.map +1 -1
- package/dist/file/file.service.js +38 -1
- package/dist/file/file.service.js.map +1 -1
- package/dist/file/provider/s3.provider.d.ts +1 -0
- package/dist/file/provider/s3.provider.d.ts.map +1 -1
- package/dist/file/provider/s3.provider.js +38 -29
- package/dist/file/provider/s3.provider.js.map +1 -1
- package/dist/oauth/oauth.service.d.ts.map +1 -1
- package/dist/oauth/oauth.service.js +2 -1
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/profile/profile.controller.d.ts +6 -6
- package/dist/profile/profile.service.d.ts +6 -6
- package/dist/session/session.controller.d.ts +2 -2
- package/dist/session/session.service.d.ts +3 -3
- package/dist/setting/setting.controller.d.ts +9 -9
- package/dist/setting/setting.service.d.ts +10 -10
- package/dist/user/constants/user.constants.d.ts +1 -0
- package/dist/user/constants/user.constants.d.ts.map +1 -1
- package/dist/user/constants/user.constants.js +2 -1
- package/dist/user/constants/user.constants.js.map +1 -1
- package/dist/user/user.controller.d.ts +15 -15
- package/dist/user/user.service.d.ts +39 -39
- package/dist/user/user.service.d.ts.map +1 -1
- package/dist/user/user.service.js +2 -1
- package/dist/user/user.service.js.map +1 -1
- package/hedhog/data/dashboard_item.yaml +11 -11
- package/hedhog/data/route.yaml +8 -0
- package/hedhog/frontend/app/dashboard/[slug]/dashboard-content.tsx.ejs +76 -15
- package/hedhog/frontend/app/dashboard/components/widgets/email-notifications.tsx.ejs +85 -61
- package/hedhog/frontend/app/dashboard/components/widgets/locale-config.tsx.ejs +139 -280
- package/hedhog/frontend/app/dashboard/components/widgets/mail-config.tsx.ejs +161 -407
- package/hedhog/frontend/app/dashboard/components/widgets/oauth-config.tsx.ejs +150 -271
- package/hedhog/frontend/app/dashboard/components/widgets/profile-card.tsx.ejs +3 -3
- package/hedhog/frontend/app/dashboard/components/widgets/storage-config.tsx.ejs +161 -305
- package/hedhog/frontend/app/dashboard/components/widgets/theme-config.tsx.ejs +184 -246
- package/hedhog/frontend/app/dashboard/components/widgets/user-roles.tsx.ejs +12 -14
- package/hedhog/frontend/messages/en.json +90 -0
- package/hedhog/frontend/messages/pt.json +90 -0
- package/hedhog/table/mail_sent_user.yaml +75 -0
- package/package.json +4 -4
- package/src/dashboard/dashboard-core/dashboard-core.controller.ts +5 -0
- package/src/dashboard/dashboard-core/dashboard-core.module.ts +6 -1
- package/src/dashboard/dashboard-core/dashboard-core.service.ts +766 -3
- package/src/file/file.controller.ts +37 -13
- package/src/file/file.service.ts +47 -5
- package/src/file/provider/s3.provider.ts +39 -29
- package/src/oauth/oauth.service.ts +8 -7
- package/src/user/constants/user.constants.ts +1 -0
- package/src/user/user.service.ts +2 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { Badge } from '@/components/ui/badge';
|
|
4
|
-
import { Button } from '@/components/ui/button';
|
|
5
4
|
import {
|
|
6
5
|
Card,
|
|
7
6
|
CardContent,
|
|
@@ -9,288 +8,168 @@ import {
|
|
|
9
8
|
CardHeader,
|
|
10
9
|
CardTitle,
|
|
11
10
|
} from '@/components/ui/card';
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} from '@/
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
CheckCircle2,
|
|
22
|
-
ChevronDown,
|
|
23
|
-
ExternalLink,
|
|
24
|
-
KeyRound,
|
|
25
|
-
XCircle,
|
|
26
|
-
} from 'lucide-react';
|
|
27
|
-
import { useState } from 'react';
|
|
11
|
+
import { useWidgetData } from '@/hooks/use-widget-data';
|
|
12
|
+
import type {
|
|
13
|
+
DashboardCoreConfigOverviewData,
|
|
14
|
+
OAuthConfigWidgetData,
|
|
15
|
+
} from '@/types/widget-data';
|
|
16
|
+
import { CheckCircle2, KeyRound, XCircle } from 'lucide-react';
|
|
17
|
+
import { useTranslations } from 'next-intl';
|
|
18
|
+
import { WidgetWrapper } from '../widget-wrapper';
|
|
28
19
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
callbackUrl: string;
|
|
39
|
-
scopes: string;
|
|
40
|
-
docUrl: string;
|
|
41
|
-
}
|
|
20
|
+
const defaultOAuthConfigData: OAuthConfigWidgetData = {
|
|
21
|
+
status: {
|
|
22
|
+
isConfigured: false,
|
|
23
|
+
enabledProviderCount: 0,
|
|
24
|
+
configuredProviderCount: 0,
|
|
25
|
+
connectedAccountCount: 0,
|
|
26
|
+
},
|
|
27
|
+
providers: [],
|
|
28
|
+
};
|
|
42
29
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
fill="#4285F4"
|
|
48
|
-
/>
|
|
49
|
-
<path
|
|
50
|
-
d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"
|
|
51
|
-
fill="#34A853"
|
|
52
|
-
/>
|
|
53
|
-
<path
|
|
54
|
-
d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"
|
|
55
|
-
fill="#FBBC05"
|
|
56
|
-
/>
|
|
57
|
-
<path
|
|
58
|
-
d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"
|
|
59
|
-
fill="#EA4335"
|
|
60
|
-
/>
|
|
61
|
-
</svg>
|
|
62
|
-
);
|
|
30
|
+
interface OAuthConfigProps {
|
|
31
|
+
widget?: { name?: string };
|
|
32
|
+
onRemove?: () => void;
|
|
33
|
+
}
|
|
63
34
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
<path d="M12 0C5.37 0 0 5.37 0 12c0 5.3 3.44 9.8 8.2 11.39.6.11.82-.26.82-.58v-2.03c-3.34.73-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.09-.74.08-.73.08-.73 1.2.08 1.84 1.24 1.84 1.24 1.07 1.83 2.81 1.3 3.5 1 .11-.78.42-1.3.76-1.6-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.13-.3-.54-1.52.12-3.18 0 0 1.01-.32 3.3 1.23a11.5 11.5 0 0 1 6.02 0c2.28-1.55 3.29-1.23 3.29-1.23.66 1.66.25 2.88.12 3.18.77.84 1.24 1.91 1.24 3.22 0 4.61-2.81 5.63-5.48 5.92.43.37.81 1.1.81 2.22v3.29c0 .32.22.7.82.58C20.57 21.8 24 17.3 24 12c0-6.63-5.37-12-12-12z" />
|
|
67
|
-
</svg>
|
|
68
|
-
);
|
|
35
|
+
export default function OAuthConfig({ widget, onRemove }: OAuthConfigProps) {
|
|
36
|
+
const t = useTranslations('core.DashboardPage.oauthConfig');
|
|
69
37
|
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
38
|
+
const { data, isLoading, isError, isAccessDenied } = useWidgetData<
|
|
39
|
+
DashboardCoreConfigOverviewData,
|
|
40
|
+
OAuthConfigWidgetData
|
|
41
|
+
>({
|
|
42
|
+
endpoint: '/dashboard-core/config/overview',
|
|
43
|
+
queryKey: 'dashboard-core-config-overview',
|
|
44
|
+
select: (d) => d.oauthConfig,
|
|
45
|
+
});
|
|
75
46
|
|
|
76
|
-
const
|
|
77
|
-
<svg className="h-4 w-4" viewBox="0 0 24 24">
|
|
78
|
-
<rect width="10.5" height="10.5" x="1" y="1" fill="#F25022" />
|
|
79
|
-
<rect width="10.5" height="10.5" x="12.5" y="1" fill="#7FBA00" />
|
|
80
|
-
<rect width="10.5" height="10.5" x="1" y="12.5" fill="#00A4EF" />
|
|
81
|
-
<rect width="10.5" height="10.5" x="12.5" y="12.5" fill="#FFB900" />
|
|
82
|
-
</svg>
|
|
83
|
-
);
|
|
84
|
-
|
|
85
|
-
const initialProviders: OAuthProvider[] = [
|
|
86
|
-
{
|
|
87
|
-
id: 'google',
|
|
88
|
-
name: 'Google',
|
|
89
|
-
color: 'text-foreground',
|
|
90
|
-
bgColor: 'bg-red-50',
|
|
91
|
-
icon: googleSvg,
|
|
92
|
-
enabled: true,
|
|
93
|
-
clientId: '123456789.apps.googleusercontent.com',
|
|
94
|
-
clientSecret: '',
|
|
95
|
-
callbackUrl: 'https://app.heroadmin.com/auth/callback/google',
|
|
96
|
-
scopes: 'openid email profile',
|
|
97
|
-
docUrl: 'https://console.cloud.google.com/apis/credentials',
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
id: 'github',
|
|
101
|
-
name: 'GitHub',
|
|
102
|
-
color: 'text-foreground',
|
|
103
|
-
bgColor: 'bg-gray-50',
|
|
104
|
-
icon: githubSvg,
|
|
105
|
-
enabled: true,
|
|
106
|
-
clientId: 'Iv1.abc123def456',
|
|
107
|
-
clientSecret: '',
|
|
108
|
-
callbackUrl: 'https://app.heroadmin.com/auth/callback/github',
|
|
109
|
-
scopes: 'read:user user:email',
|
|
110
|
-
docUrl: 'https://github.com/settings/developers',
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
id: 'facebook',
|
|
114
|
-
name: 'Facebook',
|
|
115
|
-
color: 'text-foreground',
|
|
116
|
-
bgColor: 'bg-blue-50',
|
|
117
|
-
icon: facebookSvg,
|
|
118
|
-
enabled: false,
|
|
119
|
-
clientId: '',
|
|
120
|
-
clientSecret: '',
|
|
121
|
-
callbackUrl: 'https://app.heroadmin.com/auth/callback/facebook',
|
|
122
|
-
scopes: 'email public_profile',
|
|
123
|
-
docUrl: 'https://developers.facebook.com/apps/',
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
id: 'microsoft',
|
|
127
|
-
name: 'Microsoft',
|
|
128
|
-
color: 'text-foreground',
|
|
129
|
-
bgColor: 'bg-sky-50',
|
|
130
|
-
icon: microsoftSvg,
|
|
131
|
-
enabled: false,
|
|
132
|
-
clientId: '',
|
|
133
|
-
clientSecret: '',
|
|
134
|
-
callbackUrl: 'https://app.heroadmin.com/auth/callback/microsoft',
|
|
135
|
-
scopes: 'openid email profile User.Read',
|
|
136
|
-
docUrl:
|
|
137
|
-
'https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade',
|
|
138
|
-
},
|
|
139
|
-
];
|
|
140
|
-
|
|
141
|
-
export default function OAuthConfig() {
|
|
142
|
-
const [providers, setProviders] = useState(initialProviders);
|
|
143
|
-
const [openId, setOpenId] = useState<string | null>(null);
|
|
144
|
-
|
|
145
|
-
function updateProvider(id: string, updates: Partial<OAuthProvider>) {
|
|
146
|
-
setProviders((prev) =>
|
|
147
|
-
prev.map((p) => (p.id === id ? { ...p, ...updates } : p))
|
|
148
|
-
);
|
|
149
|
-
}
|
|
47
|
+
const oauthData = data ?? defaultOAuthConfigData;
|
|
150
48
|
|
|
151
49
|
return (
|
|
152
|
-
<
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
50
|
+
<WidgetWrapper
|
|
51
|
+
isLoading={isLoading}
|
|
52
|
+
isError={isError}
|
|
53
|
+
isAccessDenied={isAccessDenied}
|
|
54
|
+
widgetName={widget?.name ?? t('title')}
|
|
55
|
+
onRemove={onRemove}
|
|
56
|
+
>
|
|
57
|
+
<Card className="flex h-full min-h-0 flex-col overflow-hidden">
|
|
58
|
+
<CardHeader className="shrink-0">
|
|
59
|
+
<div className="flex items-center justify-between gap-3">
|
|
60
|
+
<div className="flex items-center gap-3">
|
|
61
|
+
<div className="flex h-10 w-10 items-center justify-center rounded-lg bg-amber-50">
|
|
62
|
+
<KeyRound className="h-5 w-5 text-amber-600" />
|
|
63
|
+
</div>
|
|
64
|
+
<div>
|
|
65
|
+
<CardTitle className="text-base">{t('title')}</CardTitle>
|
|
66
|
+
<CardDescription>{t('description')}</CardDescription>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
<Badge
|
|
70
|
+
variant="secondary"
|
|
71
|
+
className={
|
|
72
|
+
oauthData.status.isConfigured
|
|
73
|
+
? 'bg-emerald-50 text-emerald-700'
|
|
74
|
+
: 'bg-amber-50 text-amber-700'
|
|
75
|
+
}
|
|
76
|
+
>
|
|
77
|
+
{oauthData.status.isConfigured ? t('configured') : t('pending')}
|
|
78
|
+
</Badge>
|
|
157
79
|
</div>
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
80
|
+
</CardHeader>
|
|
81
|
+
<CardContent className="flex min-h-0 flex-1 flex-col gap-4 overflow-hidden pt-0">
|
|
82
|
+
<div className="grid grid-cols-3 gap-2">
|
|
83
|
+
<div className="rounded-lg border bg-muted/30 p-3 text-center">
|
|
84
|
+
<p className="text-[11px] text-muted-foreground">
|
|
85
|
+
{t('enabled')}
|
|
86
|
+
</p>
|
|
87
|
+
<p className="mt-1 text-lg font-semibold">
|
|
88
|
+
{oauthData.status.enabledProviderCount}
|
|
89
|
+
</p>
|
|
90
|
+
</div>
|
|
91
|
+
<div className="rounded-lg border bg-muted/30 p-3 text-center">
|
|
92
|
+
<p className="text-[11px] text-muted-foreground">
|
|
93
|
+
{t('configuredProviders')}
|
|
94
|
+
</p>
|
|
95
|
+
<p className="mt-1 text-lg font-semibold">
|
|
96
|
+
{oauthData.status.configuredProviderCount}
|
|
97
|
+
</p>
|
|
98
|
+
</div>
|
|
99
|
+
<div className="rounded-lg border bg-muted/30 p-3 text-center">
|
|
100
|
+
<p className="text-[11px] text-muted-foreground">
|
|
101
|
+
{t('connectedAccounts')}
|
|
102
|
+
</p>
|
|
103
|
+
<p className="mt-1 text-lg font-semibold">
|
|
104
|
+
{oauthData.status.connectedAccountCount}
|
|
105
|
+
</p>
|
|
106
|
+
</div>
|
|
163
107
|
</div>
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
</Badge>
|
|
203
|
-
)}
|
|
108
|
+
|
|
109
|
+
<div className="min-h-0 flex-1 space-y-2 overflow-auto">
|
|
110
|
+
{oauthData.providers.length > 0 ? (
|
|
111
|
+
oauthData.providers.map((provider) => (
|
|
112
|
+
<div key={provider.id} className="rounded-lg border p-3">
|
|
113
|
+
<div className="flex items-center justify-between gap-2">
|
|
114
|
+
<p className="text-sm font-medium">{provider.label}</p>
|
|
115
|
+
<div className="flex items-center gap-1.5">
|
|
116
|
+
<Badge
|
|
117
|
+
variant="secondary"
|
|
118
|
+
className={
|
|
119
|
+
provider.enabled
|
|
120
|
+
? 'bg-emerald-50 text-emerald-700'
|
|
121
|
+
: 'bg-muted text-muted-foreground'
|
|
122
|
+
}
|
|
123
|
+
>
|
|
124
|
+
{provider.enabled ? (
|
|
125
|
+
<>
|
|
126
|
+
<CheckCircle2 className="mr-1 h-3 w-3" />
|
|
127
|
+
{t('enabled')}
|
|
128
|
+
</>
|
|
129
|
+
) : (
|
|
130
|
+
<>
|
|
131
|
+
<XCircle className="mr-1 h-3 w-3" />
|
|
132
|
+
{t('disabled')}
|
|
133
|
+
</>
|
|
134
|
+
)}
|
|
135
|
+
</Badge>
|
|
136
|
+
<Badge
|
|
137
|
+
variant="outline"
|
|
138
|
+
className={
|
|
139
|
+
provider.configured
|
|
140
|
+
? 'border-emerald-200 text-emerald-700'
|
|
141
|
+
: 'text-muted-foreground'
|
|
142
|
+
}
|
|
143
|
+
>
|
|
144
|
+
{provider.configured ? t('configured') : t('pending')}
|
|
145
|
+
</Badge>
|
|
204
146
|
</div>
|
|
205
|
-
<span className="text-xs text-muted-foreground">
|
|
206
|
-
{p.clientId
|
|
207
|
-
? `Client ID: ${p.clientId.slice(0, 16)}...`
|
|
208
|
-
: 'Nao configurado'}
|
|
209
|
-
</span>
|
|
210
|
-
</div>
|
|
211
|
-
<ChevronDown
|
|
212
|
-
className={`h-4 w-4 text-muted-foreground transition-transform ${openId === p.id ? 'rotate-180' : ''}`}
|
|
213
|
-
/>
|
|
214
|
-
</button>
|
|
215
|
-
</CollapsibleTrigger>
|
|
216
|
-
<CollapsibleContent>
|
|
217
|
-
<div className="border-t px-4 pb-4 pt-4 space-y-4">
|
|
218
|
-
<div className="flex items-center justify-between">
|
|
219
|
-
<Label htmlFor={`${p.id}-enabled`} className="text-sm">
|
|
220
|
-
Habilitar {p.name}
|
|
221
|
-
</Label>
|
|
222
|
-
<Switch
|
|
223
|
-
id={`${p.id}-enabled`}
|
|
224
|
-
checked={p.enabled}
|
|
225
|
-
onCheckedChange={(checked) =>
|
|
226
|
-
updateProvider(p.id, { enabled: checked })
|
|
227
|
-
}
|
|
228
|
-
/>
|
|
229
|
-
</div>
|
|
230
|
-
<div className="space-y-2">
|
|
231
|
-
<Label htmlFor={`${p.id}-client-id`}>Client ID</Label>
|
|
232
|
-
<Input
|
|
233
|
-
id={`${p.id}-client-id`}
|
|
234
|
-
value={p.clientId}
|
|
235
|
-
onChange={(e) =>
|
|
236
|
-
updateProvider(p.id, { clientId: e.target.value })
|
|
237
|
-
}
|
|
238
|
-
className="font-mono text-sm"
|
|
239
|
-
/>
|
|
240
|
-
</div>
|
|
241
|
-
<div className="space-y-2">
|
|
242
|
-
<Label htmlFor={`${p.id}-client-secret`}>
|
|
243
|
-
Client Secret
|
|
244
|
-
</Label>
|
|
245
|
-
<Input
|
|
246
|
-
id={`${p.id}-client-secret`}
|
|
247
|
-
type="password"
|
|
248
|
-
value={p.clientSecret}
|
|
249
|
-
onChange={(e) =>
|
|
250
|
-
updateProvider(p.id, { clientSecret: e.target.value })
|
|
251
|
-
}
|
|
252
|
-
className="font-mono text-sm"
|
|
253
|
-
placeholder="********"
|
|
254
|
-
/>
|
|
255
147
|
</div>
|
|
256
|
-
<div className="
|
|
257
|
-
<
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
onChange={(e) =>
|
|
271
|
-
updateProvider(p.id, { scopes: e.target.value })
|
|
272
|
-
}
|
|
273
|
-
className="font-mono text-sm"
|
|
274
|
-
/>
|
|
275
|
-
</div>
|
|
276
|
-
<div className="flex items-center justify-between border-t pt-3">
|
|
277
|
-
<a
|
|
278
|
-
href={p.docUrl}
|
|
279
|
-
target="_blank"
|
|
280
|
-
rel="noopener noreferrer"
|
|
281
|
-
className="flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors"
|
|
282
|
-
>
|
|
283
|
-
<ExternalLink className="h-3 w-3" />
|
|
284
|
-
Abrir console do provedor
|
|
285
|
-
</a>
|
|
286
|
-
<Button size="sm">Salvar</Button>
|
|
148
|
+
<div className="mt-2 flex flex-wrap gap-3 text-[11px] text-muted-foreground">
|
|
149
|
+
<span>
|
|
150
|
+
{t('scopesCount', { count: provider.scopesCount })}
|
|
151
|
+
</span>
|
|
152
|
+
<span>
|
|
153
|
+
{t('connectedUsers', { count: provider.connectedUsers })}
|
|
154
|
+
</span>
|
|
155
|
+
<span>
|
|
156
|
+
{provider.missingKeys.length > 0
|
|
157
|
+
? t('missingKeys', {
|
|
158
|
+
count: provider.missingKeys.length,
|
|
159
|
+
})
|
|
160
|
+
: t('allKeysPresent')}
|
|
161
|
+
</span>
|
|
287
162
|
</div>
|
|
288
163
|
</div>
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
164
|
+
))
|
|
165
|
+
) : (
|
|
166
|
+
<p className="text-xs text-muted-foreground">
|
|
167
|
+
{t('noProviders')}
|
|
168
|
+
</p>
|
|
169
|
+
)}
|
|
170
|
+
</div>
|
|
171
|
+
</CardContent>
|
|
172
|
+
</Card>
|
|
173
|
+
</WidgetWrapper>
|
|
295
174
|
);
|
|
296
175
|
}
|
|
@@ -39,8 +39,8 @@ function ProfileContent({ profile }: { profile: ProfileData }) {
|
|
|
39
39
|
|
|
40
40
|
return (
|
|
41
41
|
<Card className="relative flex h-full flex-col overflow-hidden">
|
|
42
|
-
<div className="absolute inset-x-0 top-0 h-
|
|
43
|
-
<CardContent className="relative flex flex-
|
|
42
|
+
<div className="absolute inset-x-0 top-0 h-28 bg-linear-to-br from-muted to-muted/50" />
|
|
43
|
+
<CardContent className="relative flex flex-1 flex-col overflow-hidden pt-7 pb-12">
|
|
44
44
|
<div className="flex flex-col items-center gap-4 sm:flex-row sm:items-end">
|
|
45
45
|
<div className="relative">
|
|
46
46
|
<Avatar className="h-20 w-20 border-4 border-card shadow-md">
|
|
@@ -84,7 +84,7 @@ function ProfileContent({ profile }: { profile: ProfileData }) {
|
|
|
84
84
|
</Button>
|
|
85
85
|
</div>
|
|
86
86
|
|
|
87
|
-
<Separator className="my-
|
|
87
|
+
<Separator className="my-6" />
|
|
88
88
|
|
|
89
89
|
<div className="grid grid-cols-1 gap-2 sm:grid-cols-2">
|
|
90
90
|
<div className="flex items-center gap-2.5 rounded-lg p-2 transition-colors hover:bg-muted/50">
|