From 03db0c585036d6437d4ddc410f2f93356dcc41e0 Mon Sep 17 00:00:00 2001 From: amcmanu3 Date: Wed, 17 May 2023 12:51:45 -0400 Subject: [PATCH] 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 %}