From 9d62477b0bca99428cb7c1d507f80d93b251715d Mon Sep 17 00:00:00 2001 From: amcmanu3 Date: Wed, 17 May 2023 12:15:25 -0400 Subject: [PATCH 1/6] Add credit to server jars --- app/frontend/static/assets/images/powered-by-serverjars.svg | 1 + app/frontend/templates/server/wizard.html | 1 + 2 files changed, 2 insertions(+) create mode 100644 app/frontend/static/assets/images/powered-by-serverjars.svg diff --git a/app/frontend/static/assets/images/powered-by-serverjars.svg b/app/frontend/static/assets/images/powered-by-serverjars.svg new file mode 100644 index 00000000..ba4b44f4 --- /dev/null +++ b/app/frontend/static/assets/images/powered-by-serverjars.svg @@ -0,0 +1 @@ +POWERED BY: \ No newline at end of file diff --git a/app/frontend/templates/server/wizard.html b/app/frontend/templates/server/wizard.html index 5f6c1ef4..0a201cbb 100644 --- a/app/frontend/templates/server/wizard.html +++ b/app/frontend/templates/server/wizard.html @@ -185,6 +185,7 @@  {{ translate('error', 'serverJars2', data['lang']) }}

{% end %} + Powered by serverjars.com {% end %} From 03db0c585036d6437d4ddc410f2f93356dcc41e0 Mon Sep 17 00:00:00 2001 From: amcmanu3 Date: Wed, 17 May 2023 12:51:45 -0400 Subject: [PATCH 2/6] Improve error notifications. Fix remove server jar logo on error --- app/classes/web/server_handler.py | 4 +- .../templates/server/bedrock_wizard.html | 42 ++++++++++++++++++- app/frontend/templates/server/wizard.html | 21 ++++++---- app/translations/en_EN.json | 6 ++- 4 files changed, 59 insertions(+), 14 deletions(-) diff --git a/app/classes/web/server_handler.py b/app/classes/web/server_handler.py index 408152da..70628d5d 100644 --- a/app/classes/web/server_handler.py +++ b/app/classes/web/server_handler.py @@ -166,7 +166,9 @@ class ServerHandler(BaseHandler): "not a server creator or server limit reached" ) return - + page_data["server_api"] = self.helper.check_address_status( + "https://minecraft.net/en-us/download/server/bedrock/" + ) template = "server/bedrock_wizard.html" self.render( diff --git a/app/frontend/templates/server/bedrock_wizard.html b/app/frontend/templates/server/bedrock_wizard.html index d910eb06..46979876 100644 --- a/app/frontend/templates/server/bedrock_wizard.html +++ b/app/frontend/templates/server/bedrock_wizard.html @@ -17,7 +17,6 @@
- {% if data['online'] %}
@@ -27,6 +26,35 @@

+ {% if data["server_api"] and data["online"] %} +
+ {% else %} +
+ + {% end %} {% raw xsrf_form_html() %}
@@ -72,12 +100,22 @@ data['lang']) }} +
+ {% if not data["server_api"] and data["online"] %} +
+

 {{ translate('error', 'bedrockError', data['lang']) }} {{ translate('error', 'craftyStatus', data['lang']) }} +  {{ translate('error', 'serverJars2', data['lang']) }}

+ {% end %} + {% if not data["online"] %} +
+

 {{ translate('error', 'noInternet', data['lang']) }}

+ {% end %}

- {% end %}
diff --git a/app/frontend/templates/server/wizard.html b/app/frontend/templates/server/wizard.html index 0a201cbb..5085ca90 100644 --- a/app/frontend/templates/server/wizard.html +++ b/app/frontend/templates/server/wizard.html @@ -17,7 +17,6 @@
- {% if data['online'] %}
@@ -27,21 +26,18 @@

- {% if data["server_api"] %} + {% if data["server_api"] and data["online"] %}
{% else %}
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/frontend/static/assets/images/serverjars/ICON.svg b/app/frontend/static/assets/images/serverjars/ICON.svg new file mode 100644 index 00000000..2adc4cff --- /dev/null +++ b/app/frontend/static/assets/images/serverjars/ICON.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/frontend/templates/server/wizard.html b/app/frontend/templates/server/wizard.html index 6a363816..85258431 100644 --- a/app/frontend/templates/server/wizard.html +++ b/app/frontend/templates/server/wizard.html @@ -20,6 +20,10 @@
+ {% if data["server_api"] and data["online"] %} + + {% end %}

{{ translate('serverWizard', 'newServer', data['lang']) }}


@@ -980,7 +984,7 @@ function wait_msg(importing) { bootbox.alert({ title: importing ? '{% raw translate("serverWizard", "importing", data["lang"]) %}' : '{% raw translate("serverWizard", "downloading", data["lang"]) %}', - message: importing ? ' {% raw translate("serverWizard", "bePatient", data["lang"]) %}': ' {% raw translate("serverWizard", "bePatient", data["lang"]) %}

Powered by serverjars.com', + message: importing ? ' {% raw translate("serverWizard", "bePatient", data["lang"]) %}': ' {% raw translate("serverWizard", "bePatient", data["lang"]) %}

Powered by serverjars.com', }); } From fe2724d35040588bd6792b934be4d351ff88eda3 Mon Sep 17 00:00:00 2001 From: amcmanu3 Date: Mon, 22 May 2023 21:03:29 -0400 Subject: [PATCH 5/6] Set bedrock availablity to true always for now :) --- app/classes/web/server_handler.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/classes/web/server_handler.py b/app/classes/web/server_handler.py index 70628d5d..eae3ce0c 100644 --- a/app/classes/web/server_handler.py +++ b/app/classes/web/server_handler.py @@ -166,9 +166,7 @@ class ServerHandler(BaseHandler): "not a server creator or server limit reached" ) return - page_data["server_api"] = self.helper.check_address_status( - "https://minecraft.net/en-us/download/server/bedrock/" - ) + page_data["server_api"] = True template = "server/bedrock_wizard.html" self.render( From 10ab029cd1c66bb67aef31f2dc34ab87cfbd1df7 Mon Sep 17 00:00:00 2001 From: Zedifus Date: Tue, 23 May 2023 02:09:21 +0100 Subject: [PATCH 6/6] Update changelog !587 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d2540c9..ca5f44ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ TBD - Fix task scheduling where a command was not sent to the DB ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/586)) ### Tweaks - Improve the UI on several areas of the Crafty Panel ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/547)) +- Improve creation page errors / Server Jars Credit ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/587)) ### Lang TBD