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

diff --git a/app/classes/web/server_handler.py b/app/classes/web/server_handler.py index 408152da..eae3ce0c 100644 --- a/app/classes/web/server_handler.py +++ b/app/classes/web/server_handler.py @@ -166,7 +166,7 @@ class ServerHandler(BaseHandler): "not a server creator or server limit reached" ) return - + page_data["server_api"] = True template = "server/bedrock_wizard.html" self.render( diff --git a/app/frontend/static/assets/css/crafty.css b/app/frontend/static/assets/css/crafty.css index c8edba8b..ce5f80c9 100644 --- a/app/frontend/static/assets/css/crafty.css +++ b/app/frontend/static/assets/css/crafty.css @@ -136,6 +136,10 @@ body { margin-bottom: 0px; } +.bootbox-body { + text-align: center; +} + /**************************************************************/ /* CSS for Froms Displays */ /**************************************************************/ 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/static/assets/images/serverjars/FULL-WHITE.svg b/app/frontend/static/assets/images/serverjars/FULL-WHITE.svg new file mode 100644 index 00000000..d5036723 --- /dev/null +++ b/app/frontend/static/assets/images/serverjars/FULL-WHITE.svg @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/bedrock_wizard.html b/app/frontend/templates/server/bedrock_wizard.html index 976281f2..7e7f6a4a 100644 --- a/app/frontend/templates/server/bedrock_wizard.html +++ b/app/frontend/templates/server/bedrock_wizard.html @@ -17,8 +17,7 @@
- {% if data['online'] %} -
+
@@ -26,6 +25,35 @@
+ {% if data["server_api"] and data["online"] %} +
+ {% else %} +
+ + {% end %} {% raw xsrf_form_html() %}
@@ -60,12 +88,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 8e2b74fe..4d3e20fb 100644 --- a/app/frontend/templates/server/wizard.html +++ b/app/frontend/templates/server/wizard.html @@ -17,18 +17,20 @@
- - {% if data['online'] %} -
+
+ {% if data["server_api"] and data["online"] %} + + {% end %}

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


- {% if data["server_api"] %} + {% if data["server_api"] and data["online"] %}
{% else %}
@@ -175,11 +177,27 @@

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

+ +
+ + + + {% if not data["server_api"] and data["online"] %} +
+

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

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

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

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

Powered by serverjars.com', }); } diff --git a/app/translations/en_EN.json b/app/translations/en_EN.json index f30bc6c8..54895ca4 100644 --- a/app/translations/en_EN.json +++ b/app/translations/en_EN.json @@ -188,9 +188,11 @@ "fileError": "File type must be an image.", "migration": "Crafty's main server storage is being mirgated to a new location. All server starts have been suspended during this time. Please wait while we finish this migration", "serverJars1": "Server JARs API unreachable. Please check", + "bedrockError": "Bedrock downloads unavailable. Please check", "craftyStatus": "Crafty's status page", "serverJars2": "for the most up to date information.", - "cronFormat": "Invalid Cron format detected" + "cronFormat": "Invalid Cron format detected", + "noInternet": "Crafty is having trouble accessing the internet. Server Creation has been disabled. Please check your internet connection and refresh this page." }, "footer": { "allRightsReserved": "All rights reserved", @@ -625,4 +627,4 @@ "manager": "Manager", "selectManager": "Select Manager for User" } -} +} \ No newline at end of file