groove-dev 0.17.5 → 0.17.6

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.
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>GROOVE</title>
7
- <script type="module" crossorigin src="/assets/index-DYqJ7W7j.js"></script>
7
+ <script type="module" crossorigin src="/assets/index-CsymvgNh.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="/assets/index-BhjOFLBc.css">
9
9
  </head>
10
10
  <body>
@@ -366,7 +366,7 @@ function CredentialModal({ integration, onClose }) {
366
366
  }
367
367
 
368
368
  // -- Integration Detail Modal --
369
- function IntegrationDetailModal({ integration, installing, onInstall, onUninstall, onConfigure, onClose }) {
369
+ function IntegrationDetailModal({ integration, installing, onInstall, onUninstall, onConfigure, onAuthenticate, onClose }) {
370
370
  if (!integration) return null;
371
371
 
372
372
  const isAutoAuth = integration.authType === 'none' && (integration.envKeys || []).length === 0;
@@ -406,6 +406,14 @@ function IntegrationDetailModal({ integration, installing, onInstall, onUninstal
406
406
  <div style={modal.actionBar}>
407
407
  {integration.installed ? (
408
408
  <div style={{ display: 'flex', gap: 8, flex: 1 }}>
409
+ {isAutoAuth && (
410
+ <button
411
+ onClick={() => onAuthenticate(integration)}
412
+ style={modal.installBtn}
413
+ >
414
+ Sign in with {integration.name.includes('Google') || integration.id.includes('google') || integration.id === 'gmail' ? 'Google' : integration.name}
415
+ </button>
416
+ )}
409
417
  {hasCredentials && (
410
418
  <button
411
419
  onClick={() => onConfigure(integration)}
@@ -654,6 +662,7 @@ export default function IntegrationsStore() {
654
662
  const [selectedItem, setSelectedItem] = useState(null);
655
663
  const [configuring, setConfiguring] = useState(null);
656
664
  const [hovered, setHovered] = useState(null);
665
+ const [statusMsg, setStatusMsg] = useState('');
657
666
 
658
667
  const fetchIntegrations = useCallback(async () => {
659
668
  setLoading(true);
@@ -706,6 +715,26 @@ export default function IntegrationsStore() {
706
715
  setConfiguring(item);
707
716
  }
708
717
 
718
+ async function handleAuthenticate(item) {
719
+ setSelectedItem(null);
720
+ try {
721
+ const res = await fetch(`/api/integrations/${item.id}/authenticate`, { method: 'POST' });
722
+ const data = await res.json();
723
+ if (data.ok) {
724
+ flash('Sign-in window opened — check your browser');
725
+ } else {
726
+ flash(data.error || 'Authentication failed');
727
+ }
728
+ } catch {
729
+ flash('Authentication failed');
730
+ }
731
+ }
732
+
733
+ function flash(msg) {
734
+ setStatusMsg(msg);
735
+ setTimeout(() => setStatusMsg(''), 4000);
736
+ }
737
+
709
738
  function handleConfigureClose() {
710
739
  setConfiguring(null);
711
740
  fetchIntegrations();
@@ -752,6 +781,13 @@ export default function IntegrationsStore() {
752
781
  </div>
753
782
  </div>
754
783
 
784
+ {/* Status message */}
785
+ {statusMsg && (
786
+ <div style={{ padding: '4px 20px', fontSize: 10, color: 'var(--accent)', flexShrink: 0 }}>
787
+ {statusMsg}
788
+ </div>
789
+ )}
790
+
755
791
  {/* Toolbar */}
756
792
  <div style={styles.toolbar}>
757
793
  <div style={styles.searchRow}>
@@ -845,6 +881,7 @@ export default function IntegrationsStore() {
845
881
  onInstall={handleInstall}
846
882
  onUninstall={handleUninstall}
847
883
  onConfigure={handleConfigure}
884
+ onAuthenticate={handleAuthenticate}
848
885
  onClose={() => setSelectedItem(null)}
849
886
  />
850
887