kyd-shared-badge 0.3.124 → 0.3.125
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
|
@@ -3,7 +3,7 @@ import { useRouter } from 'next/navigation';
|
|
|
3
3
|
import { ProviderIcon } from '../utils/provider';
|
|
4
4
|
import { normalizeLinkedInInput } from './linkedin';
|
|
5
5
|
import type { ConnectAccountsProps } from './types';
|
|
6
|
-
import { CheckCircle, Link2, LinkIcon, Unlink, ArrowLeft, ExternalLink, Eye, Lock, InfoIcon } from 'lucide-react';
|
|
6
|
+
import { CheckCircle, Link2, LinkIcon, Unlink, ArrowLeft, ExternalLink, Eye, Lock, InfoIcon, EyeClosed, EyeOffIcon } from 'lucide-react';
|
|
7
7
|
import { AnimatePresence, motion, useReducedMotion } from 'framer-motion';
|
|
8
8
|
import { Button, Input, Spinner, Card, CardHeader, CardContent, CardTitle, ConnectProgress } from '../ui';
|
|
9
9
|
import Link from 'next/link';
|
|
@@ -424,15 +424,24 @@ export function ConnectAccounts(props: ConnectAccountsProps) {
|
|
|
424
424
|
</Button>
|
|
425
425
|
</motion.div>
|
|
426
426
|
<motion.div whileHover={{ scale: 1.02 }} whileTap={{ scale: 0.98 }}>
|
|
427
|
-
<
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
427
|
+
<TooltipProvider>
|
|
428
|
+
<Tooltip>
|
|
429
|
+
<TooltipTrigger asChild>
|
|
430
|
+
<Button
|
|
431
|
+
className="w-full sm:w-auto bg-[var(--icon-accent)] text-white transition-colors font-semibold"
|
|
432
|
+
onClick={onGithubAppInstall}
|
|
433
|
+
>
|
|
434
|
+
<span className="flex items-center justify-center">
|
|
435
|
+
<ExternalLink className="w-4 h-4 mr-2" />
|
|
436
|
+
Yes, connect my private repos
|
|
437
|
+
</span>
|
|
438
|
+
</Button>
|
|
439
|
+
</TooltipTrigger>
|
|
440
|
+
<TooltipContent>
|
|
441
|
+
<p>Connect your private repositories</p>
|
|
442
|
+
</TooltipContent>
|
|
443
|
+
</Tooltip>
|
|
444
|
+
</TooltipProvider>
|
|
436
445
|
</motion.div>
|
|
437
446
|
</div>
|
|
438
447
|
</motion.div>
|
|
@@ -530,15 +539,24 @@ export function ConnectAccounts(props: ConnectAccountsProps) {
|
|
|
530
539
|
</div>
|
|
531
540
|
) : (
|
|
532
541
|
<motion.div whileHover={{ scale: 1.02 }} whileTap={{ scale: 0.98 }}>
|
|
533
|
-
<
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
+
<TooltipProvider>
|
|
543
|
+
<Tooltip>
|
|
544
|
+
<TooltipTrigger asChild>
|
|
545
|
+
<Button
|
|
546
|
+
onClick={() => setSelectedProviderIdAndCallback('github')}
|
|
547
|
+
onMouseEnter={() => setPreview('github', 'connect')}
|
|
548
|
+
onMouseLeave={clearPreview}
|
|
549
|
+
className="bg-[var(--icon-button-secondary)] text-[var(--text-main)] hover:bg-[var(--icon-accent)] hover:text-white border-0 sm:px-4 px-3 py-1 sm:py-2 rounded-lg flex items-center gap-2"
|
|
550
|
+
>
|
|
551
|
+
<Eye className="size-3 sm:size-4" />
|
|
552
|
+
<span className="sm:text-base text-sm">Connect</span>
|
|
553
|
+
</Button>
|
|
554
|
+
</TooltipTrigger>
|
|
555
|
+
<TooltipContent>
|
|
556
|
+
<p>Connect your public repositories</p>
|
|
557
|
+
</TooltipContent>
|
|
558
|
+
</Tooltip>
|
|
559
|
+
</TooltipProvider>
|
|
542
560
|
</motion.div>
|
|
543
561
|
)}
|
|
544
562
|
|
|
@@ -561,15 +579,24 @@ export function ConnectAccounts(props: ConnectAccountsProps) {
|
|
|
561
579
|
</div>
|
|
562
580
|
) : (
|
|
563
581
|
<motion.div whileHover={{ scale: 1.02 }} whileTap={{ scale: 0.98 }}>
|
|
564
|
-
<
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
582
|
+
<TooltipProvider>
|
|
583
|
+
<Tooltip>
|
|
584
|
+
<TooltipTrigger asChild>
|
|
585
|
+
<Button
|
|
586
|
+
onClick={() => setSelectedProviderIdAndCallback('githubapp')}
|
|
587
|
+
onMouseEnter={() => setPreview('githubapp', 'connect')}
|
|
588
|
+
onMouseLeave={clearPreview}
|
|
589
|
+
className="bg-[var(--icon-button-secondary)] text-[var(--text-main)] hover:bg-[var(--icon-accent)] hover:text-white border-0 sm:px-4 px-3 py-1 sm:py-2 rounded-lg flex items-center gap-2"
|
|
590
|
+
>
|
|
591
|
+
<EyeOffIcon className="size-3 sm:size-4" />
|
|
592
|
+
<span className="sm:text-base text-sm">Connect</span>
|
|
593
|
+
</Button>
|
|
594
|
+
</TooltipTrigger>
|
|
595
|
+
<TooltipContent>
|
|
596
|
+
<p>Connect your private repositories</p>
|
|
597
|
+
</TooltipContent>
|
|
598
|
+
</Tooltip>
|
|
599
|
+
</TooltipProvider>
|
|
573
600
|
</motion.div>
|
|
574
601
|
)}
|
|
575
602
|
</div>
|
|
@@ -58,29 +58,7 @@ export function ConnectProgress(props: ConnectProgressProps) {
|
|
|
58
58
|
if (previewAction === 'connect' && !has) next.add(pid)
|
|
59
59
|
if (previewAction === 'disconnect' && has) next.delete(pid)
|
|
60
60
|
const val = computePercent(next)
|
|
61
|
-
|
|
62
|
-
try {
|
|
63
|
-
// Debug details for preview behavior
|
|
64
|
-
const beforePercent = progressPercent
|
|
65
|
-
const beforeOthers = (() => {
|
|
66
|
-
let c = 0; normalizedIds.forEach(id => { if (id !== 'github' && id !== 'githubapp' && id !== 'linkedin') c += 1 })
|
|
67
|
-
return c
|
|
68
|
-
})()
|
|
69
|
-
let afterOthers = 0; next.forEach(id => { if (id !== 'github' && id !== 'githubapp' && id !== 'linkedin') afterOthers += 1 })
|
|
70
|
-
// eslint-disable-next-line no-console
|
|
71
|
-
console.log('[ConnectProgress] preview', {
|
|
72
|
-
pid,
|
|
73
|
-
previewAction,
|
|
74
|
-
hasBefore: normalizedIds.has(pid),
|
|
75
|
-
beforePercent,
|
|
76
|
-
afterPercent: val,
|
|
77
|
-
beforeOthers,
|
|
78
|
-
afterOthers,
|
|
79
|
-
normalizedIds: Array.from(normalizedIds),
|
|
80
|
-
nextIds: Array.from(next),
|
|
81
|
-
})
|
|
82
|
-
} catch {}
|
|
83
|
-
}
|
|
61
|
+
|
|
84
62
|
return val === progressPercent ? null : val
|
|
85
63
|
}, [previewProviderId, previewAction, normalizedIds, progressPercent])
|
|
86
64
|
|