Skip to content

Commit 5a1eab8

Browse files
committed
Merge branch 'main' into release-string-encryption
2 parents 21204ea + e98a0bc commit 5a1eab8

File tree

6 files changed

+90
-87
lines changed

6 files changed

+90
-87
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>

src/lib/layout/createProject.svelte

Lines changed: 33 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -22,44 +22,42 @@
2222
{/each}
2323
</svelte:head>
2424

25-
<form on:submit|preventDefault>
25+
<Layout.Stack direction="column" gap="xxl">
26+
{#if showTitle}
27+
<Typography.Title size="l">Create your project</Typography.Title>
28+
{/if}
2629
<Layout.Stack direction="column" gap="xxl">
27-
{#if showTitle}
28-
<Typography.Title size="l">Create your project</Typography.Title>
29-
{/if}
3030
<Layout.Stack direction="column" gap="xxl">
31-
<Layout.Stack direction="column" gap="xxl">
32-
<Layout.Stack direction="column" gap="s">
33-
<Input.Text
34-
label="Name"
35-
placeholder="Project name"
36-
required
37-
autofocus
38-
bind:value={projectName} />
39-
{#if !showCustomId}
40-
<div>
41-
<Tag
42-
size="s"
43-
on:click={() => {
44-
showCustomId = true;
45-
}}><Icon slot="start" icon={IconPencil} size="s" /> Project ID</Tag>
46-
</div>
47-
{/if}
48-
<CustomId bind:show={showCustomId} name="Project" isProject bind:id />
49-
</Layout.Stack>
50-
{#if isCloud && regions.length > 0}
51-
<Layout.Stack gap="xs">
52-
<Input.Select
53-
required
54-
bind:value={region}
55-
placeholder="Select a region"
56-
options={filterRegions(regions)}
57-
label="Region" />
58-
<Typography.Text>Region cannot be changed after creation</Typography.Text>
59-
</Layout.Stack>
31+
<Layout.Stack direction="column" gap="s">
32+
<Input.Text
33+
label="Name"
34+
placeholder="Project name"
35+
required
36+
autofocus
37+
bind:value={projectName} />
38+
{#if !showCustomId}
39+
<div>
40+
<Tag
41+
size="s"
42+
on:click={() => {
43+
showCustomId = true;
44+
}}><Icon icon={IconPencil} slot="start" size="s" /> Project ID</Tag>
45+
</div>
6046
{/if}
47+
<CustomId bind:show={showCustomId} name="Project" isProject bind:id />
6148
</Layout.Stack>
49+
{#if isCloud && regions.length > 0}
50+
<Layout.Stack gap="xs">
51+
<Input.Select
52+
required
53+
bind:value={region}
54+
placeholder="Select a region"
55+
options={filterRegions(regions)}
56+
label="Region" />
57+
<Typography.Text>Region cannot be changed after creation</Typography.Text>
58+
</Layout.Stack>
59+
{/if}
6260
</Layout.Stack>
63-
<slot name="submit"></slot>
6461
</Layout.Stack>
65-
</form>
62+
<slot name="submit"></slot>
63+
</Layout.Stack>

src/routes/(console)/project-[region]-[project]/auth/security/updateSessionLength.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
1818
async function updateSessionLength() {
1919
try {
20-
await sdk.forConsole.projects.updateAuthDuration($project.$id, $baseValue);
20+
await sdk.forConsole.projects.updateAuthDuration(project.$id, $baseValue);
2121
await invalidate(Dependencies.PROJECT);
2222
2323
addNotification({

src/routes/(console)/project-[region]-[project]/functions/function-[function]/settings/updateResourceLimits.svelte

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
export let func: Models.Function;
1919
export let specs: Models.SpecificationList;
2020
let specification = func.specification;
21+
let originalSpecification = func.specification;
22+
$: originalSpecification = func.specification;
2123
2224
async function updateLogging() {
2325
try {
@@ -47,6 +49,9 @@
4749
specification || undefined
4850
);
4951
await invalidate(Dependencies.FUNCTION);
52+
53+
originalSpecification = specification;
54+
5055
addNotification({
5156
type: 'success',
5257
message: 'Resource limits have been updated'
@@ -96,7 +101,7 @@
96101
</svelte:fragment>
97102

98103
<svelte:fragment slot="actions">
99-
<Button disabled={func.specification === specification} submit>Update</Button>
104+
<Button disabled={originalSpecification === specification} submit>Update</Button>
100105
</svelte:fragment>
101106
</CardGrid>
102107
</Form>

src/routes/(console)/project-[region]-[project]/messaging/providers/settingsFormInput.svelte

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,6 @@
4343
| FCMProviderParams
4444
| APNSProviderParams
4545
>;
46-
const popover = input.popover ? PopoverContent : null;
47-
const popoverProps = getPopoverProps(input);
48-
49-
function getPopoverProps(input: ProviderInput) {
50-
if (!input.popover) {
51-
return {};
52-
}
53-
return {
54-
lines: input.popover,
55-
image: input.popoverImage
56-
};
57-
}
5846
5947
function handleInvalid(e: CustomEvent) {
6048
const reason = e.detail?.reason ?? '';
@@ -71,6 +59,14 @@
7159
});
7260
}
7361
}
62+
63+
$: popover = input.popover ? PopoverContent : null;
64+
$: popoverProps = !input.popover
65+
? {}
66+
: {
67+
lines: input.popover,
68+
image: input.popoverImage
69+
};
7470
</script>
7571

7672
{#if input.type === 'text'}

src/routes/(console)/project-[region]-[project]/sites/site-[site]/settings/updateResourceLimits.svelte

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
export let site: Models.Site;
1818
export let specs: Models.SpecificationList;
1919
let specification = site.specification;
20+
let originalSpecification = site.specification;
21+
22+
$: originalSpecification = site.specification;
2023
2124
async function updateLogging() {
2225
try {
@@ -42,7 +45,9 @@
4245
site?.providerRootDirectory || undefined,
4346
specification || undefined
4447
);
45-
await invalidate(Dependencies.FUNCTION);
48+
await invalidate(Dependencies.SITE);
49+
originalSpecification = specification;
50+
4651
addNotification({
4752
type: 'success',
4853
message: 'Resource limits have been updated'
@@ -92,7 +97,7 @@
9297
</svelte:fragment>
9398

9499
<svelte:fragment slot="actions">
95-
<Button disabled={site.specification === specification} submit>Update</Button>
100+
<Button disabled={originalSpecification === specification} submit>Update</Button>
96101
</svelte:fragment>
97102
</CardGrid>
98103
</Form>

0 commit comments

Comments
 (0)