kyd-shared-badge 0.3.125 → 0.3.126
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
|
@@ -57,10 +57,18 @@ export function ConnectAccounts(props: ConnectAccountsProps) {
|
|
|
57
57
|
const [previewAction, setPreviewAction] = useState<'connect' | 'disconnect' | null>(null);
|
|
58
58
|
|
|
59
59
|
const apiBase = apiGatewayUrl || (typeof process !== 'undefined' ? (process.env.NEXT_PUBLIC_API_GATEWAY_URL as string) : '');
|
|
60
|
-
const connectedIds = useMemo(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
const connectedIds = useMemo(() => {
|
|
61
|
+
const set = new Set((connected || []).map(c => (c.id ? c.id.toLowerCase() : c.name.toLowerCase())));
|
|
62
|
+
// Include virtual provider 'githubapp' when the GitHub App is installed
|
|
63
|
+
try {
|
|
64
|
+
const gh = (connected || []).find(c => (c?.name || '').toLowerCase() === 'github');
|
|
65
|
+
const setupAction = gh?.app_installation_info?.setupAction;
|
|
66
|
+
if (setupAction === 'install' || setupAction === 'created') {
|
|
67
|
+
set.add('githubapp');
|
|
68
|
+
}
|
|
69
|
+
} catch {}
|
|
70
|
+
return set;
|
|
71
|
+
}, [connected]);
|
|
64
72
|
const reconnectIds = useMemo(() => new Set((needsReconnectIds || []).map(id => id.toLowerCase())), [needsReconnectIds]);
|
|
65
73
|
|
|
66
74
|
// React to upstream changes to initialProviderId (e.g., after oauth success)
|
|
@@ -570,6 +578,8 @@ export function ConnectAccounts(props: ConnectAccountsProps) {
|
|
|
570
578
|
<div className="absolute right-0 opacity-0 transition-opacity group-hover:opacity-100">
|
|
571
579
|
<button
|
|
572
580
|
onClick={() => { window.location.href = 'https://github.com/settings/installations'; }}
|
|
581
|
+
onMouseEnter={() => setPreview('githubapp', 'disconnect')}
|
|
582
|
+
onMouseLeave={clearPreview}
|
|
573
583
|
className="inline-flex items-center gap-1.5 py-1.5 text-sm text-red-600 hover:text-red-700 hover:underline"
|
|
574
584
|
>
|
|
575
585
|
<Unlink className="size-3 sm:size-4" />
|
|
@@ -108,18 +108,7 @@ export function ConnectProgress(props: ConnectProgressProps) {
|
|
|
108
108
|
gain = 10
|
|
109
109
|
}
|
|
110
110
|
const to = Math.max(0, Math.min(100, progressPercent + gain))
|
|
111
|
-
|
|
112
|
-
try {
|
|
113
|
-
// eslint-disable-next-line no-console
|
|
114
|
-
console.log('[ConnectProgress] selectedPulse', {
|
|
115
|
-
sid,
|
|
116
|
-
progressPercent,
|
|
117
|
-
gain,
|
|
118
|
-
to,
|
|
119
|
-
othersAlready: otherConnectedCount,
|
|
120
|
-
})
|
|
121
|
-
} catch {}
|
|
122
|
-
}
|
|
111
|
+
|
|
123
112
|
return { from: progressPercent, to }
|
|
124
113
|
}, [selectedProviderId, normalizedIds, progressPercent, otherConnectedCount])
|
|
125
114
|
|
|
@@ -104,7 +104,13 @@ export function ProgressCircle(props: ProgressCircleProps) {
|
|
|
104
104
|
</svg>
|
|
105
105
|
{centerIndicator ? (
|
|
106
106
|
<div className={`absolute inset-0 flex items-center justify-center`} aria-hidden>
|
|
107
|
-
<ArrowUpIcon
|
|
107
|
+
<ArrowUpIcon
|
|
108
|
+
className={`w-4 h-4`}
|
|
109
|
+
style={{
|
|
110
|
+
color: centerIndicator === 'up' ? greenHex : redHex,
|
|
111
|
+
transform: centerIndicator === 'up' ? undefined : 'rotate(180deg)',
|
|
112
|
+
}}
|
|
113
|
+
/>
|
|
108
114
|
</div>
|
|
109
115
|
) : null}
|
|
110
116
|
</div>
|