From 0eda9e6315ee736cf48a484d85910c995c995f2d Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 24 Jan 2026 20:09:56 +0530 Subject: [PATCH] add: account creation. feat: mocking options. --- app/views/install/installer.phtml | 70 ++++- app/views/install/installer/css/styles.css | 280 +++++++++++++++++- app/views/install/installer/icons/eye-off.svg | 4 + app/views/install/installer/icons/eye.svg | 4 + app/views/install/installer/js/installer.js | 47 ++- .../install/installer/js/modules/context.js | 29 +- .../installer/js/modules/mock-controls.js | 97 ++++++ .../install/installer/js/modules/mock.js | 40 +++ .../install/installer/js/modules/progress.js | 109 +++++-- .../install/installer/js/modules/state.js | 12 +- .../installer/js/modules/validation.js | 6 + app/views/install/installer/js/steps.js | 103 ++++++- .../installer/templates/steps/step-2.phtml | 2 +- .../installer/templates/steps/step-3.phtml | 111 ++++--- .../installer/templates/steps/step-4.phtml | 99 ++++--- .../installer/templates/steps/step-5.phtml | 53 ++++ .../Platform/Installer/HttpHandler.php | 44 ++- .../Platform/Installer/Runtime/State.php | 2 +- src/Appwrite/Platform/Installer/Server.php | 9 +- src/Appwrite/Platform/Tasks/Install.php | 198 +++++++++++-- 20 files changed, 1101 insertions(+), 218 deletions(-) create mode 100644 app/views/install/installer/icons/eye-off.svg create mode 100644 app/views/install/installer/icons/eye.svg create mode 100644 app/views/install/installer/js/modules/mock-controls.js create mode 100644 app/views/install/installer/js/modules/mock.js create mode 100644 app/views/install/installer/templates/steps/step-5.phtml diff --git a/app/views/install/installer.phtml b/app/views/install/installer.phtml index db97dc7bdb..a469d2be9d 100644 --- a/app/views/install/installer.phtml +++ b/app/views/install/installer.phtml @@ -19,9 +19,9 @@ if ($installMode === 'mock' && $defaultEmailCertificates === '') { } $step = isset($_GET['step']) ? (int) $_GET['step'] : 1; -$step = max(1, min(4, $step)); -if ($isUpgrade && $step === 2) { - $step = 3; +$step = max(1, min(5, $step)); +if ($isUpgrade && ($step === 2 || $step === 3)) { + $step = 4; } $partialFile = __DIR__ . "/installer/templates/steps/step-{$step}.phtml"; @@ -34,7 +34,7 @@ if (isset($_GET['partial'])) { exit; } -$cardStep = min(3, $step); +$cardStep = min(4, $step); $stepFile = __DIR__ . "/installer/templates/steps/step-{$cardStep}.phtml"; if (!is_file($stepFile)) { $stepFile = __DIR__ . "/installer/templates/steps/step-1.phtml"; @@ -43,6 +43,8 @@ $cssVersion = @filemtime(__DIR__ . '/installer/css/styles.css') ?: time(); $tooltipsVersion = @filemtime(__DIR__ . '/installer/js/tooltips.js') ?: time(); $constantsVersion = @filemtime(__DIR__ . '/installer/js/constants.js') ?: time(); $stepsContextVersion = @filemtime(__DIR__ . '/installer/js/modules/context.js') ?: time(); +$mockModuleVersion = @filemtime(__DIR__ . '/installer/js/modules/mock.js') ?: time(); +$mockControlsVersion = @filemtime(__DIR__ . '/installer/js/modules/mock-controls.js') ?: time(); $stepsStateVersion = @filemtime(__DIR__ . '/installer/js/modules/state.js') ?: time(); $stepsValidationVersion = @filemtime(__DIR__ . '/installer/js/modules/validation.js') ?: time(); $stepsUiVersion = @filemtime(__DIR__ . '/installer/js/modules/ui.js') ?: time(); @@ -64,6 +66,10 @@ $installerVersion = @filemtime(__DIR__ . '/installer/js/installer.js') ?: time() + + + + @@ -127,6 +133,10 @@ $installerVersion = @filemtime(__DIR__ . '/installer/js/installer.js') ?: time() + + + + + +

Adjust mock responses for this session.

+ +
+
+
+

Simulate session expiry

+

Show the toast error before install starts.

+
+ +
+
+
+

Simulate install error

+

Show a failed step and retry flow.

+
+ +
+
+
+

Simulate account error

+

Fail the account creation step.

+
+ +
+
+ + + +