Skip to content

Commit 90ed67f

Browse files
committed
fix: QA issues
1 parent 6f3adc6 commit 90ed67f

File tree

5 files changed

+24
-12
lines changed

5 files changed

+24
-12
lines changed

src/lib/constants.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,18 @@ export const scopes: {
376376
description: "Access to create, update, and delete your project's sites and deployments",
377377
category: 'Sites',
378378
icon: 'globe'
379+
},
380+
{
381+
scope: 'log.read',
382+
description: "Access to read your sites's logs",
383+
category: 'Sites',
384+
icon: 'globe'
385+
},
386+
{
387+
scope: 'log.write',
388+
description: "Access to execute your project's sites",
389+
category: 'Sites',
390+
icon: 'globe'
379391
}
380392
];
381393

src/routes/(console)/project-[project]/overview/keys/scopes.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@
7777
}
7878
}
7979
}
80+
81+
$: console.log(scopes);
8082
</script>
8183

8284
<Layout.Stack>
@@ -90,7 +92,7 @@
9092
<Layout.Stack gap="none">
9193
<Divider />
9294

93-
{#each [Category.Auth, Category.Database, Category.Functions, Category.Storage, Category.Messaging, Category.Other] as category}
95+
{#each [Category.Auth, Category.Database, Category.Functions, Category.Storage, Category.Messaging, Category.Sites, Category.Other] as category}
9496
{@const checked = categoryState(category, scopes)}
9597
{@const scopesLength = allScopes.filter(
9698
(n) => n.category === category && scopes.includes(n.scope)
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
22
import { invalidate } from '$app/navigation';
33
import { Submit, trackEvent, trackError } from '$lib/actions/analytics';
4-
import { Modal } from '$lib/components';
4+
import { Confirm } from '$lib/components';
55
import { Dependencies } from '$lib/constants';
66
import { Button } from '$lib/elements/forms';
77
import { addNotification } from '$lib/stores/notifications';
@@ -10,6 +10,7 @@
1010
1111
export let showCancel = false;
1212
export let selectedDeployment: Models.Deployment;
13+
let error = '';
1314
1415
async function handleSubmit() {
1516
try {
@@ -24,20 +25,17 @@
2425
message: `Deployment has been cancelled`
2526
});
2627
trackEvent(Submit.DeploymentCancel);
27-
} catch (error) {
28-
addNotification({
29-
type: 'error',
30-
message: error.message
31-
});
32-
trackError(error, Submit.DeploymentCancel);
28+
} catch (e) {
29+
error = e.message;
30+
trackError(e, Submit.DeploymentCancel);
3331
}
3432
}
3533
</script>
3634

37-
<Modal title="Cancel deployment" bind:show={showCancel} onSubmit={handleSubmit}>
35+
<Confirm title="Cancel deployment" bind:open={showCancel} onSubmit={handleSubmit} bind:error>
3836
<p data-private>Are you sure you want to cancel this deployment?</p>
3937
<svelte:fragment slot="footer">
4038
<Button text on:click={() => (showCancel = false)}>Cancel</Button>
4139
<Button secondary submit>Continue</Button>
4240
</svelte:fragment>
43-
</Modal>
41+
</Confirm>

src/routes/(console)/project-[project]/sites/site-[site]/logs/store.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ export const columns = writable<Column[]>([
8888
value: 30,
8989
label: 'more than 30 seconds'
9090
}
91-
]
91+
],
92+
hide: true
9293
},
9394
{
9495
id: '$createdAt',

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@
253253
<InputText
254254
id="fallback"
255255
label="Fallback file"
256-
required
257256
placeholder="index.html"
258257
bind:value={fallback}>
259258
<Tooltip slot="info">

0 commit comments

Comments
 (0)