kyd-shared-badge 0.3.43 → 0.3.45
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/package.json
CHANGED
|
@@ -132,7 +132,7 @@ const SharedBadgeDisplay = ({ badgeData, chatProps, headless }: { badgeData: Pub
|
|
|
132
132
|
const keys = new Set(tabs.map(t => t.key));
|
|
133
133
|
if (hash && keys.has(hash)) setActiveTab(hash);
|
|
134
134
|
// If the hash targets a skills appendix anchor, switch to Appendix
|
|
135
|
-
if (hash && (hash.startsWith('appendix-skills') || hash.includes('appendix-skills-cat-'))) {
|
|
135
|
+
if (hash && (hash.startsWith('appendix-skills') || hash.includes('appendix-skills-cat-') || hash === 'appendix-connected')) {
|
|
136
136
|
setActiveTab('appendix');
|
|
137
137
|
}
|
|
138
138
|
} catch {}
|
|
@@ -428,7 +428,7 @@ const SharedBadgeDisplay = ({ badgeData, chatProps, headless }: { badgeData: Pub
|
|
|
428
428
|
})()}
|
|
429
429
|
</div>
|
|
430
430
|
)}
|
|
431
|
-
<div>
|
|
431
|
+
<div id="appendix-connected">
|
|
432
432
|
<ConnectedPlatforms accounts={connected} authenticity={assessmentResult?.account_authenticity} />
|
|
433
433
|
</div>
|
|
434
434
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import React, { useEffect } from 'react';
|
|
4
4
|
import { formatLocalDate } from '../utils/date';
|
|
5
5
|
import { FaGithub, FaGitlab, FaStackOverflow, FaLinkedin, FaGoogle, FaKaggle } from 'react-icons/fa';
|
|
6
6
|
import { SiCredly, SiFiverr } from 'react-icons/si';
|
|
@@ -35,6 +35,26 @@ const formatProviderName = (name?: string) => {
|
|
|
35
35
|
|
|
36
36
|
const ConnectedPlatforms = ({ accounts, authenticity }: { accounts?: ConnectedAccount[]; authenticity?: { label?: string; description?: string; oauth_connected?: string[]; mismatches?: Array<{ provider?: string; detail?: string }> } }) => {
|
|
37
37
|
const list = Array.isArray(accounts) ? accounts : [];
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
const flash = () => {
|
|
40
|
+
const hash = typeof window !== 'undefined' ? window.location.hash : '';
|
|
41
|
+
if (!hash) return;
|
|
42
|
+
const id = hash.startsWith('#') ? hash.slice(1) : hash;
|
|
43
|
+
const el = document.getElementById(id) as HTMLElement | null;
|
|
44
|
+
if (!el) return;
|
|
45
|
+
const originalBg = el.style.backgroundColor;
|
|
46
|
+
el.style.transition = 'background-color 300ms ease';
|
|
47
|
+
el.style.backgroundColor = 'rgba(2, 163, 137, 0.14)';
|
|
48
|
+
// Ensure visibility after tab switch
|
|
49
|
+
try { el.scrollIntoView({ behavior: 'smooth', block: 'start' }); } catch {}
|
|
50
|
+
setTimeout(() => {
|
|
51
|
+
el.style.backgroundColor = originalBg || '';
|
|
52
|
+
}, 1200);
|
|
53
|
+
};
|
|
54
|
+
flash();
|
|
55
|
+
window.addEventListener('hashchange', flash);
|
|
56
|
+
return () => window.removeEventListener('hashchange', flash);
|
|
57
|
+
}, []);
|
|
38
58
|
if (list.length === 0) return null;
|
|
39
59
|
return (
|
|
40
60
|
<div className="pt-8">
|
|
@@ -71,6 +71,9 @@ const ReportHeader = ({ badgeId, developerName, updatedAt, score = 0, badgeImage
|
|
|
71
71
|
<div className={'text-sm'}>
|
|
72
72
|
<div className={'font-semibold'} style={{ color: 'var(--text-main)' }}>Account Authenticity {isCritical ? 'Warning' : 'Notice'}</div>
|
|
73
73
|
<div className={'mt-1'} style={{ color: 'var(--text-secondary)' }}>{accountAuthenticity?.description || (isCritical ? 'We detected signals that some linked accounts may be inauthentic. Review sources below.' : 'Some inconsistencies were observed across linked accounts. Review sources below.')}</div>
|
|
74
|
+
<div className={'mt-2'}>
|
|
75
|
+
<a href="#appendix-connected" className={'text-xs font-medium underline underline-offset-2'} style={{ color: 'var(--text-secondary)' }}>See more</a>
|
|
76
|
+
</div>
|
|
74
77
|
</div>
|
|
75
78
|
</div>
|
|
76
79
|
);
|