Merge branch 'dev' into bugfix/crash-detection

This commit is contained in:
Zedifus 2024-10-02 22:20:53 +01:00
commit 8f754536b1
2 changed files with 12 additions and 17 deletions

View File

@ -3,7 +3,7 @@
### New features
TBD
### Bug fixes
TBD
- Fix logic issue causing bedrock wizard's root files buttons to not respond to user click events ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/797))
### Tweaks
TBD
### Lang

View File

@ -498,24 +498,19 @@
<script src="../../static/assets/js/shared/upload.js"></script>
<script>
document.getElementById("root_upload_button").addEventListener("click", function (event) {
if (file) {
upload = true;
if (document.getElementById('root_upload_button').classList.contains('clicked')) {
document.getElementById('main-tree-div-upload').innerHTML = '<input type="radio" class="root-input" id="main-tree-input-upload" name="root_path" value="" checked><span id="main-tree-upload" class="files-tree-title tree-caret-down root-dir"><i class="far fa-folder"></i><i class="far fa-folder-open"></i>{{ translate("serverFiles", "files", data["lang"]) }}</span></input>'
} else {
document.getElementById('root_upload_button').classList.add('clicked')
}
const token = getCookie("_xsrf");
var dialog = bootbox.dialog({
message: '<p class="text-center mb-0"><i class="fa fa-spin fa-cog"></i> Please wait while we gather your files...</p>',
closeButton: false
});
setTimeout(function () {
getDirView();
}, 2000);
if (document.getElementById('root_upload_button').classList.contains('clicked')) {
show_file_tree();
return;
} else {
bootbox.alert("You must input a path before selecting this button");
document.getElementById('root_upload_button').classList.add('clicked')
}
bootbox.dialog({
message: '<p class="text-center mb-0"><i class="fa fa-spin fa-cog"></i> Please wait while we gather your files...</p>',
closeButton: false
});
setTimeout(function () {
getDirView();
}, 2000);
});
function eula_confirm() {