Skip to content

Commit 7c05fac

Browse files
authored
Merge pull request #2098 from HarshMN2345/fix-SER-26-connect-button-not-shown-if-repo-name-to-long
2 parents b9648cb + beedfe1 commit 7c05fac

File tree

1 file changed

+35
-36
lines changed

1 file changed

+35
-36
lines changed

src/lib/components/git/repositories.svelte

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -227,49 +227,48 @@
227227
? repo.runtime.split('-')[0]
228228
: undefined}
229229
<Avatar size="xs" alt={repo.name} empty={!iconName}>
230-
<SvgIcon name={iconName} iconSize="small" />
230+
{#if iconName}
231+
<SvgIcon name={iconName} iconSize="small" />
232+
{/if}
231233
</Avatar>
232234
{/if}
233235
<Layout.Stack
234-
gap="s"
235236
direction="row"
236237
alignItems="center"
237-
justifyContent="space-between">
238-
<Layout.Stack
239-
direction="row"
240-
gap="s"
241-
alignItems="center">
242-
<Typography.Text
243-
truncate
244-
color="--fgcolor-neutral-secondary">
245-
{repo.name}
246-
</Typography.Text>
247-
{#if repo.private}
248-
<Icon
249-
size="s"
250-
icon={IconLockClosed}
251-
color="--fgcolor-neutral-tertiary" />
252-
{/if}
253-
{#if !$isSmallViewport}
254-
<time datetime={repo.pushedAt}>
255-
<Typography.Caption
256-
variant="400"
257-
truncate
258-
color="--fgcolor-neutral-tertiary">
259-
{timeFromNow(repo.pushedAt)}
260-
</Typography.Caption>
261-
</time>
262-
{/if}
263-
</Layout.Stack>
264-
{#if action === 'button'}
265-
<PinkButton.Button
266-
size="xs"
267-
variant="secondary"
268-
on:click={() => connect(repo)}>
269-
Connect
270-
</PinkButton.Button>
238+
gap="s"
239+
style="flex: 1; min-width: 0;">
240+
<Typography.Text
241+
truncate
242+
color="--fgcolor-neutral-secondary"
243+
style="flex: 1; min-width: 0;">
244+
{repo.name}
245+
</Typography.Text>
246+
{#if repo.private}
247+
<Icon
248+
size="s"
249+
icon={IconLockClosed}
250+
color="--fgcolor-neutral-tertiary" />
251+
{/if}
252+
{#if !$isSmallViewport}
253+
<time datetime={repo.pushedAt}>
254+
<Typography.Caption
255+
variant="400"
256+
truncate
257+
color="--fgcolor-neutral-tertiary">
258+
{timeFromNow(repo.pushedAt)}
259+
</Typography.Caption>
260+
</time>
271261
{/if}
272262
</Layout.Stack>
263+
{#if action === 'button'}
264+
<PinkButton.Button
265+
size="xs"
266+
variant="secondary"
267+
style="flex-shrink: 0;"
268+
on:click={() => connect(repo)}>
269+
Connect
270+
</PinkButton.Button>
271+
{/if}
273272
</Layout.Stack>
274273
</Table.Cell>
275274
</Table.Row.Base>

0 commit comments

Comments
 (0)