mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 01:35:28 +01:00
Improve error notifications.
Fix remove server jar logo on error
This commit is contained in:
parent
9d62477b0b
commit
03db0c5850
@ -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(
|
||||
|
@ -17,7 +17,6 @@
|
||||
</ul>
|
||||
<div class="d-none" id="overlay" onclick="hide(event)"></div>
|
||||
<div class="row">
|
||||
{% if data['online'] %}
|
||||
<div class="col-sm-6 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
@ -27,6 +26,35 @@
|
||||
<p class="card-description">
|
||||
|
||||
<form method="post" name="create_server" class="server-wizard" onSubmit="wait_msg()">
|
||||
{% if data["server_api"] and data["online"] %}
|
||||
<fieldset>
|
||||
{% else %}
|
||||
<fieldset disabled="disabled">
|
||||
<style>
|
||||
.api-alert{
|
||||
position:absolute;
|
||||
top:-5px;
|
||||
left:0;
|
||||
font-size: 50px !important;
|
||||
color:#fff;
|
||||
background:rgb(127, 133, 133);
|
||||
opacity:.4;
|
||||
width:100%;
|
||||
height:100%;
|
||||
z-index: 100;
|
||||
}
|
||||
.api-alert p {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
-ms-transform: translate(-50%, -50%);
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
</style>
|
||||
{% end %}
|
||||
{% raw xsrf_form_html() %}
|
||||
<div class="row">
|
||||
|
||||
@ -72,12 +100,22 @@
|
||||
data['lang']) }}</button>
|
||||
<button type="reset" class="btn btn-danger mr-2">{{ translate('serverWizard', 'resetForm', data['lang'])
|
||||
}}</button>
|
||||
</fieldset>
|
||||
{% if not data["server_api"] and data["online"] %}
|
||||
<div class="api-alert" style="position: absolute; top: -5px; z-index: 100; opacity: .99;">
|
||||
<p style="color: white !important;"><i class="fas fa-exclamation-triangle" style="color: red;"></i> {{ translate('error', 'bedrockError', data['lang']) }}<a style="color: red;"; href="https://status.craftycontrol.com/status/craftycontrol"
|
||||
target="_blank"> {{ translate('error', 'craftyStatus', data['lang']) }}</a>
|
||||
{{ translate('error', 'serverJars2', data['lang']) }}</p></div>
|
||||
{% end %}
|
||||
{% if not data["online"] %}
|
||||
<div class="api-alert" style="position: absolute; top: -5px; z-index: 100; opacity: .99;">
|
||||
<p style="color: white !important;"><i class="fas fa-exclamation-triangle" style="color: red;"></i> {{ translate('error', 'noInternet', data['lang']) }}</p></div>
|
||||
{% end %}
|
||||
</div>
|
||||
</form>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% end %}
|
||||
<div class="col-sm-6 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
@ -17,7 +17,6 @@
|
||||
</ul>
|
||||
<div class="d-none" id="overlay" onclick="hide(event)"></div>
|
||||
<div class="row">
|
||||
{% if data['online'] %}
|
||||
<div class="col-sm-6 grid-margin stretch-card">
|
||||
<div class="card" id="creation_wizard">
|
||||
<div class="card-body">
|
||||
@ -27,21 +26,18 @@
|
||||
<p class="card-description">
|
||||
|
||||
<form method="post" class="server-wizard" onSubmit="wait_msg()">
|
||||
{% if data["server_api"] %}
|
||||
{% if data["server_api"] and data["online"] %}
|
||||
<fieldset>
|
||||
{% else %}
|
||||
<fieldset disabled="disabled">
|
||||
<style>
|
||||
#creation_wizard {
|
||||
-webkit-filter: grayscale(1);
|
||||
}
|
||||
.api-alert{
|
||||
position:absolute;
|
||||
top:-5px;
|
||||
left:0;
|
||||
font-size: 50px !important;
|
||||
color:#fff;
|
||||
background:rgb(0,170,170);
|
||||
background: rgb(127, 133, 133);
|
||||
opacity:.4;
|
||||
width:100%;
|
||||
height:100%;
|
||||
@ -73,9 +69,11 @@
|
||||
onchange="serverJarChange(this)">
|
||||
{% end %}
|
||||
<option value="None">{{ translate('serverWizard', 'selectType', data['lang']) }}</option>
|
||||
{% if data["online"] %}
|
||||
{% for s in data['server_types'] %}
|
||||
<option value="{{ s }}">{{ s.capitalize() }}</option>
|
||||
{% end %}
|
||||
{% end %}
|
||||
</select>
|
||||
{% if data['super_user'] %}
|
||||
<i onclick="refreshCache()" id="refresh-cache" class="refresh-class fas fa-sync"></i>
|
||||
@ -178,17 +176,22 @@
|
||||
<button type="reset" class="btn btn-danger mr-2">{{ translate('serverWizard', 'resetForm', data['lang'])
|
||||
}}</button>
|
||||
</fieldset>
|
||||
{% if not data["server_api"] %}
|
||||
{% if not data["server_api"] and data["online"] %}
|
||||
<div class="api-alert" style="position: absolute; top: -5px; z-index: 100; opacity: .99;">
|
||||
<p style="color: white !important;"><i class="fas fa-exclamation-triangle" style="color: white;"></i> {{ translate('error', 'serverJars1', data['lang']) }}<a style="color: red;"; href="https://status.craftycontrol.com/status/craftycontrol"
|
||||
<p style="color: white !important;"><i class="fas fa-exclamation-triangle" style="color: red;"></i> {{ translate('error', 'serverJars1', data['lang']) }}<a style="color: red;"; href="https://status.craftycontrol.com/status/craftycontrol"
|
||||
target="_blank"> {{ translate('error', 'craftyStatus', data['lang']) }}</a>
|
||||
{{ translate('error', 'serverJars2', data['lang']) }}</p></div>
|
||||
{% end %}
|
||||
{% if not data["online"] %}
|
||||
<div class="api-alert" style="position: absolute; top: -5px; z-index: 100; opacity: .99;">
|
||||
<p style="color: white !important;"><i class="fas fa-exclamation-triangle" style="color: red;"></i> {{ translate('error', 'noInternet', data['lang']) }}</p></div>
|
||||
{% end %}
|
||||
</div>
|
||||
{% if data["server_api"] and data["online"] %}
|
||||
<a href="https://serverjars.com" target="_blank" style="text-align: center;"><img src="../../static/assets/images/powered-by-serverjars.svg" alt="Powered by serverjars.com" width="40%"></a>
|
||||
{% end %}
|
||||
</div>
|
||||
</form>
|
||||
{% end %}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6 grid-margin stretch-card">
|
||||
|
@ -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",
|
||||
@ -623,4 +625,4 @@
|
||||
"manager": "Manager",
|
||||
"selectManager": "Select Manager for User"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user