Add warning to wizard for unsupported mc

This commit is contained in:
amcmanu3 2024-01-28 17:57:05 -05:00
parent 27678e93ca
commit 06f59110fe
2 changed files with 17 additions and 1 deletions

View File

@ -107,7 +107,8 @@
</select> </select>
</div> </div>
</div> </div>
<span data-html="true" class="version-hint text-center"
data-content="⚠️ {{ translate('serverWizard', 'unsupported', data['lang']) }} ⚠️" , data-placement="right"></span>
<div class="col-sm-12"> <div class="col-sm-12">
<div class="form-group"> <div class="form-group">
<label for="server_name">{{ translate('serverWizard', 'serverName', data['lang']) }}</label> <label for="server_name">{{ translate('serverWizard', 'serverName', data['lang']) }}</label>
@ -1233,6 +1234,20 @@
} }
}) })
} }
$("#server").change(function (){
console.log();
if($("#server :selected").text().split(".")[1] === "7"){
$('[data-toggle="popover"]').popover();
if ($(window).width() < 1000) {
$('.version-hint').attr("data-placement", "top")
} else {
$('.version-hint').attr("data-placement", "right")
}
$('.version-hint').popover("show");
}else{
$('.version-hint').popover("hide");
}
});
function serverJarChange(selectObj) { function serverJarChange(selectObj) {
const type_select = document.getElementById('server_jar') const type_select = document.getElementById('server_jar')

View File

@ -578,6 +578,7 @@
"serverUpload": "Upload Zipped Server", "serverUpload": "Upload Zipped Server",
"serverVersion": "Server Version", "serverVersion": "Server Version",
"sizeInGB": "Size in GB", "sizeInGB": "Size in GB",
"unsupported": "Minecraft versions lower than 1.8 are not supported by Crafty. You may still install it. Results will vary.",
"uploadButton": "Upload", "uploadButton": "Upload",
"uploadZip": "Upload Zip File For Server Import", "uploadZip": "Upload Zip File For Server Import",
"zipPath": "Server Path" "zipPath": "Server Path"