diff --git a/src/lib/wizards/functions/steps/details.svelte b/src/lib/wizards/functions/steps/details.svelte
index 42f7cb1aa..db5194d7c 100644
--- a/src/lib/wizards/functions/steps/details.svelte
+++ b/src/lib/wizards/functions/steps/details.svelte
@@ -27,6 +27,7 @@
label="Name"
id="name"
placeholder="Function name"
+ autofocus
bind:value={$createFunction.name}
required />
diff --git a/src/lib/wizards/functions/steps/functionConfiguration.svelte b/src/lib/wizards/functions/steps/functionConfiguration.svelte
index ba201d88c..a0209dd8d 100644
--- a/src/lib/wizards/functions/steps/functionConfiguration.svelte
+++ b/src/lib/wizards/functions/steps/functionConfiguration.svelte
@@ -59,6 +59,7 @@
label="Name"
id="name"
placeholder="Function name"
+ autofocus
bind:value={$createFunction.name}
required />
{#if !showCustomId}
diff --git a/src/lib/wizards/functions/steps/templateConfiguration.svelte b/src/lib/wizards/functions/steps/templateConfiguration.svelte
index 49be494b6..71979b045 100644
--- a/src/lib/wizards/functions/steps/templateConfiguration.svelte
+++ b/src/lib/wizards/functions/steps/templateConfiguration.svelte
@@ -39,6 +39,7 @@
label="Name"
id="name"
placeholder="Function name"
+ autofocus
bind:value={$templateConfig.name}
required />
{#await loadRuntimes()}
diff --git a/src/routes/console/organization-[organization]/wizard/step1.svelte b/src/routes/console/organization-[organization]/wizard/step1.svelte
index c148d82a7..70bbc0050 100644
--- a/src/routes/console/organization-[organization]/wizard/step1.svelte
+++ b/src/routes/console/organization-[organization]/wizard/step1.svelte
@@ -16,6 +16,7 @@
id="name"
placeholder="Project name"
bind:value={$createProject.name}
+ autofocus
required />
{#if !showCustomId}
diff --git a/src/routes/console/organization-[organization]/wizard/step2.svelte b/src/routes/console/organization-[organization]/wizard/step2.svelte
index 7eae737f7..39af0bf5a 100644
--- a/src/routes/console/organization-[organization]/wizard/step2.svelte
+++ b/src/routes/console/organization-[organization]/wizard/step2.svelte
@@ -32,6 +32,25 @@
console.log(error);
}
}
+ async function unNotifyRegion(selectedRegion: Region) {
+ try {
+ let newPrefs = { ...prefs };
+ newPrefs.notifications = newPrefs.notifications ?? [];
+ newPrefs.notifications = [...newPrefs.notifications, selectedRegion.$id];
+ newPrefs.notifications = newPrefs.notifications.filter(
+ (region: string) => region !== selectedRegion.$id
+ );
+ const response = await sdk.forConsole.account.updatePrefs(newPrefs);
+ prefs = response.prefs;
+ addNotification({
+ type: 'info',
+ isHtml: true,
+ message: `You won't be notified anymore when the ${selectedRegion.name} region is available`
+ });
+ } catch (error) {
+ console.log(error);
+ }
+ }
$: notifications = prefs?.notifications ?? [];
@@ -72,6 +91,17 @@
Notify me
+ {:else}
+ {
+ unNotifyRegion(region);
+ }}>
+
+ Notify me
+
{/if}
{:else}
{
try {
const project = await sdk.forConsole.projects.get(params.project);
- sdk.forConsole.account.updatePrefs({ organization: project.teamId });
+ const prefs = await sdk.forConsole.account.getPrefs();
+ const newPrefs = { ...prefs, organization: project.teamId };
+ sdk.forConsole.account.updatePrefs(newPrefs);
preferences.loadTeamPrefs(project.teamId);
if (isCloud) {
diff --git a/src/routes/console/project-[project]/functions/wizard/step1.svelte b/src/routes/console/project-[project]/functions/wizard/step1.svelte
index 1878c57d6..17408aacb 100644
--- a/src/routes/console/project-[project]/functions/wizard/step1.svelte
+++ b/src/routes/console/project-[project]/functions/wizard/step1.svelte
@@ -27,6 +27,7 @@
label="Name"
id="name"
placeholder="Function name"
+ autofocus
bind:value={$createFunction.name}
required />