diff --git a/src/lib/layout/wizard.svelte b/src/lib/layout/wizard.svelte
index f62bd15d7..b260a67a1 100644
--- a/src/lib/layout/wizard.svelte
+++ b/src/lib/layout/wizard.svelte
@@ -139,7 +139,18 @@
}
$: sortedSteps = [...steps].sort(([a], [b]) => (a > b ? 1 : -1));
- $: isLastStep = $wizard.step === steps.size;
+ $: isLastStep = (() => {
+ if ($wizard.step === steps.size) {
+ return true;
+ }
+ let lastStep = true;
+ steps.forEach((step, i) => {
+ if (i > $wizard.step && !step.disabled) {
+ lastStep = false;
+ }
+ });
+ return lastStep;
+ })();
$: currentStep = steps.get($wizard.step);
diff --git a/src/lib/wizards/functions/createManual.svelte b/src/lib/wizards/functions/createManual.svelte
index f5ab83b3b..c774c3516 100644
--- a/src/lib/wizards/functions/createManual.svelte
+++ b/src/lib/wizards/functions/createManual.svelte
@@ -16,8 +16,8 @@
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
import { base } from '$app/paths';
import { page } from '$app/stores';
- import Details from './steps/details.svelte';
- import Configuration from './steps/configuration.svelte';
+ import Details from './steps/manualDetails.svelte';
+ import Configuration from './steps/manualConfiguration.svelte';
import ExecuteAccess from './steps/executeAccess.svelte';
import { isValueOfStringEnum } from '$lib/helpers/types';
diff --git a/src/lib/wizards/functions/createTemplate.svelte b/src/lib/wizards/functions/createTemplate.svelte
index 36d74abdd..03ba68fc5 100644
--- a/src/lib/wizards/functions/createTemplate.svelte
+++ b/src/lib/wizards/functions/createTemplate.svelte
@@ -1,22 +1,29 @@
-
+
diff --git a/src/lib/wizards/functions/steps/configuration.svelte b/src/lib/wizards/functions/steps/manualConfiguration.svelte
similarity index 100%
rename from src/lib/wizards/functions/steps/configuration.svelte
rename to src/lib/wizards/functions/steps/manualConfiguration.svelte
diff --git a/src/lib/wizards/functions/steps/details.svelte b/src/lib/wizards/functions/steps/manualDetails.svelte
similarity index 100%
rename from src/lib/wizards/functions/steps/details.svelte
rename to src/lib/wizards/functions/steps/manualDetails.svelte
diff --git a/src/lib/wizards/functions/steps/repositoryBehaviour.svelte b/src/lib/wizards/functions/steps/repositoryBehaviour.svelte
deleted file mode 100644
index c55fcee6b..000000000
--- a/src/lib/wizards/functions/steps/repositoryBehaviour.svelte
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
- Connect
-
- Connect function to a new repository or to an existing one within a selected Git
- organization.
-
-
-
-
- Create a new repository
- Clone the template and create a new repository in your selected organization.
-
-
- Add to existing repository
- Clone the template to an existing repository in your selected organization.
-
-
-
diff --git a/src/lib/wizards/functions/steps/templateDeployment.svelte b/src/lib/wizards/functions/steps/templateDeployment.svelte
new file mode 100644
index 000000000..e55b47015
--- /dev/null
+++ b/src/lib/wizards/functions/steps/templateDeployment.svelte
@@ -0,0 +1,53 @@
+
+
+
+ Deployment
+
+ Connect function to a new repository or to an existing one within a selected Git
+ organization.
+
+
+ Automatic with Git Recommended
+
+
+ Create a new repository
+ Clone the template and create a new repository in your selected organization.
+
+
+ Add to existing repository
+ Clone the template to an existing repository in your selected organization.
+
+
+
+ Manual with CLI
+
+
+ Create manually
+ Clone the template to an existing repository in your selected organization.
+
+
+
diff --git a/src/lib/wizards/functions/steps/templateScopes.svelte b/src/lib/wizards/functions/steps/templateScopes.svelte
new file mode 100644
index 000000000..c5c07bd07
--- /dev/null
+++ b/src/lib/wizards/functions/steps/templateScopes.svelte
@@ -0,0 +1,57 @@
+
+
+
+ Details
+ Create and deploy your function manually.
+
+
+
+
+
+ {#if !showCustomId}
+
+
(showCustomId = !showCustomId)}>
+
+ Function ID
+
+
+ {:else}
+
+ {/if}
+
+
diff --git a/src/lib/wizards/functions/store.ts b/src/lib/wizards/functions/store.ts
index e607c113b..090d97117 100644
--- a/src/lib/wizards/functions/store.ts
+++ b/src/lib/wizards/functions/store.ts
@@ -1,7 +1,8 @@
import { page } from '$app/stores';
+import type { WizardStepsType } from '$lib/layout/wizard.svelte';
import type { MarketplaceTemplate } from '$lib/stores/marketplace';
import type { Models } from '@appwrite.io/console';
-import { derived, writable } from 'svelte/store';
+import { derived, writable, type Writable } from 'svelte/store';
export const template = writable();
export const templateConfig = writable<{
@@ -9,9 +10,9 @@ export const templateConfig = writable<{
name: string;
runtime: string;
variables: { [key: string]: unknown };
- repositoryBehaviour: 'new' | 'existing';
- repositoryName: string;
- repositoryPrivate: boolean;
+ repositoryBehaviour: 'new' | 'existing' | 'manual';
+ repositoryName?: string;
+ repositoryPrivate?: boolean;
repositoryId: string;
appwriteApiKey?: string;
generateKey?: boolean;
@@ -59,3 +60,5 @@ function createFunctionStore() {
export const createFunction = createFunctionStore();
export const createFunctionDeployment = writable();
+
+export const templateStepsComponents: Writable = writable(new Map());