From 01ccbce99bc3c13ed8c4f792f51e7b800b55ce2b Mon Sep 17 00:00:00 2001 From: M Venkatesh Date: Thu, 22 Jan 2026 18:36:00 +0000 Subject: [PATCH 1/8] refactor: remove old files --- nano_press/templates/__base.html | 13 ----- .../includes/home/custom_app_modal.html | 27 --------- .../templates/includes/home/header.html | 4 -- .../templates/includes/home/step_domain.html | 14 ----- .../includes/home/step_select_apps.html | 53 ----------------- .../includes/home/step_server_details.html | 41 ------------- .../templates/includes/home/step_summary.html | 57 ------------------- .../templates/includes/home/stepper.html | 13 ----- nano_press/www/home.html | 30 ---------- 9 files changed, 252 deletions(-) delete mode 100644 nano_press/templates/__base.html delete mode 100644 nano_press/templates/includes/home/custom_app_modal.html delete mode 100644 nano_press/templates/includes/home/header.html delete mode 100644 nano_press/templates/includes/home/step_domain.html delete mode 100644 nano_press/templates/includes/home/step_select_apps.html delete mode 100644 nano_press/templates/includes/home/step_server_details.html delete mode 100644 nano_press/templates/includes/home/step_summary.html delete mode 100644 nano_press/templates/includes/home/stepper.html delete mode 100644 nano_press/www/home.html diff --git a/nano_press/templates/__base.html b/nano_press/templates/__base.html deleted file mode 100644 index 8dd0f3d..0000000 --- a/nano_press/templates/__base.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - {% block page_title %}{% endblock %} - {% block head %}{% endblock %} - - - {% block page_content %}{% endblock %} - {% block script %}{% endblock %} - - diff --git a/nano_press/templates/includes/home/custom_app_modal.html b/nano_press/templates/includes/home/custom_app_modal.html deleted file mode 100644 index 098bd0b..0000000 --- a/nano_press/templates/includes/home/custom_app_modal.html +++ /dev/null @@ -1,27 +0,0 @@ - diff --git a/nano_press/templates/includes/home/header.html b/nano_press/templates/includes/home/header.html deleted file mode 100644 index 330b23e..0000000 --- a/nano_press/templates/includes/home/header.html +++ /dev/null @@ -1,4 +0,0 @@ -
-

Self Host Frappe

-

Deploy your Frappe applications in minutes

-
diff --git a/nano_press/templates/includes/home/step_domain.html b/nano_press/templates/includes/home/step_domain.html deleted file mode 100644 index aac19f1..0000000 --- a/nano_press/templates/includes/home/step_domain.html +++ /dev/null @@ -1,14 +0,0 @@ -
-

Domain

- -
- - -

Leave empty to skip domain setup

-
- -
- - -
-
diff --git a/nano_press/templates/includes/home/step_select_apps.html b/nano_press/templates/includes/home/step_select_apps.html deleted file mode 100644 index e02a528..0000000 --- a/nano_press/templates/includes/home/step_select_apps.html +++ /dev/null @@ -1,53 +0,0 @@ -
-

Select Apps

- -
- -
- - -
-
- -
- -
- -
-
- - - - - -
- - -
-
diff --git a/nano_press/templates/includes/home/step_server_details.html b/nano_press/templates/includes/home/step_server_details.html deleted file mode 100644 index d9ef4b9..0000000 --- a/nano_press/templates/includes/home/step_server_details.html +++ /dev/null @@ -1,41 +0,0 @@ -
-

Server Details

- -
- - -
- -
- -
- - -
-

Copy this key and add it to your server. Learn how

-
- -
-
- Advanced Settings - - - -
-
-
- - -
- -
- - -
-
-
- - -
diff --git a/nano_press/templates/includes/home/step_summary.html b/nano_press/templates/includes/home/step_summary.html deleted file mode 100644 index c418012..0000000 --- a/nano_press/templates/includes/home/step_summary.html +++ /dev/null @@ -1,57 +0,0 @@ -
-

Summary

- -
-
-

Server

-

IP:

-

User:

-

Port:

-
- -
-

Configuration

-

Version:

-

Apps:

- -
- -
- - -
-
- -
-
-

Deploying

-

- -
-
-
- Preparing server -
-
-
- Deploying site -
-
-
- -
-
- - - -
-

Deployment Complete

-

Your Frappe site is ready

- - -
-
diff --git a/nano_press/templates/includes/home/stepper.html b/nano_press/templates/includes/home/stepper.html deleted file mode 100644 index 8e13c1e..0000000 --- a/nano_press/templates/includes/home/stepper.html +++ /dev/null @@ -1,13 +0,0 @@ -
-
-
- - -
diff --git a/nano_press/www/home.html b/nano_press/www/home.html deleted file mode 100644 index 3a3cf88..0000000 --- a/nano_press/www/home.html +++ /dev/null @@ -1,30 +0,0 @@ -{% extends "templates/__base.html" %} - -{% block page_title %}Self Host Frappe{% endblock %} - -{% block head %} - {{ super() }} - - -{% endblock %} - -{% block page_content %} -
- {% include "templates/includes/home/header.html" %} - {% include "templates/includes/home/stepper.html" %} - -
- {% include "templates/includes/home/step_server_details.html" %} - {% include "templates/includes/home/step_select_apps.html" %} - {% include "templates/includes/home/step_domain.html" %} - {% include "templates/includes/home/step_summary.html" %} -
- - {% include "templates/includes/home/custom_app_modal.html" %} -
-{% endblock %} - -{% block script %} - {{ super() }} - -{% endblock %} From 3d6c46a71c1c3152dc351de140e9a643d827cad0 Mon Sep 17 00:00:00 2001 From: M Venkatesh Date: Thu, 22 Jan 2026 18:36:40 +0000 Subject: [PATCH 2/8] refactor(ui): clean up server component code structure - Remove nested x-data component and merge copy functionality into main serverSetup() - Consolidate duplicate IP validation regex into validateIP() method - Remove unused 'copied' property - Remove redundant 'typeof toast !== undefined' checks (toast is always available) - Move global helper functions into serverSetup() as methods (createServerDoc, pingServer, verifyAndCreateServer) - Replace string concatenation with template literals - Remove unnecessary parentheses around string literals - Fix indentation throughout serverSetup() function for better readability This refactoring eliminates code duplication, removes dead code, prevents global namespace pollution, and improves overall maintainability without changing functionality. --- .../templates/components/core/server.html | 266 ++++++++++-------- .../templates/components/core/stepper.html | 5 +- 2 files changed, 151 insertions(+), 120 deletions(-) diff --git a/nano_press/templates/components/core/server.html b/nano_press/templates/components/core/server.html index 5ebd792..56da3be 100644 --- a/nano_press/templates/components/core/server.html +++ b/nano_press/templates/components/core/server.html @@ -4,50 +4,65 @@

Server Details

-
- - - - - +
+ {% if user_servers %} +
+ +
+ +
+ + + +
+
+
+ {% endif %} + +
+ + + + + +
-
+