Skip to content

Commit

Permalink
Studio: Open the site's URL from the Sync connect popup (#799)
Browse files Browse the repository at this point in the history
* Make links open in sync modal

---------

Co-authored-by: Kateryna Kodonenko <[email protected]>
  • Loading branch information
katinthehatsite and Kateryna Kodonenko authored Jan 16, 2025
1 parent 3cebcaf commit fa48819
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/components/sync-sites-modal-selector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useState, useEffect } from 'react';
import { useOffline } from '../hooks/use-offline';
import { cx } from '../lib/cx';
import { getIpcApi } from '../lib/get-ipc-api';
import { ArrowIcon } from './arrow-icon';
import { Badge } from './badge';
import Button from './button';
import { CreateButton } from './connect-create-buttons';
Expand Down Expand Up @@ -206,11 +207,19 @@ function SiteItem( {
<div className={ cx( 'a8c-body truncate', ! isSyncable && 'text-a8c-gray-30' ) }>
{ site.name }
</div>
<div
className={ cx( 'a8c-body-small text-a8c-gray-30 truncate', isSelected && 'text-white' ) }
<Button
variant="link"
className={ cx(
'a8c-body-small truncate !p-0',
isSelected
? '!text-inherit hover:!text-inherit'
: '!text-a8c-gray-30 hover:!text-a8c-gray-30'
) }
onClick={ () => getIpcApi().openURL( site.url ) }
>
{ site.url.replace( /^https?:\/\//, '' ) }
</div>
<ArrowIcon />
</Button>
</div>
{ isSyncable && (
<div className="flex gap-2">
Expand Down

0 comments on commit fa48819

Please sign in to comment.