Skip to content

Commit b502276

Browse files
lancepiochDaneEveritt
authored andcommitted
Do not keep processing the file/folder paths if the user has cancelled the operation and fix pterodactyl#1124 (pterodactyl#1177)
1 parent 1ffb5ac commit b502276

File tree

5 files changed

+16
-3
lines changed

5 files changed

+16
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
1717
* Fixes tokens being sent to users when their account is created to actually work. Implements Laravel's internal token creation mechanisms rather than trying to do it custom.
1818
* Updates some eggs to ensure they have the correct data and will continue working down the road. Fixes autoupdating on some source servers and MC related download links.
1919
* Emails should send properly now when a server is marked as installed to let the owner know it is ready for action.
20+
* Cancelling a file manager operation should cancel correctly across all browsers now.
2021

2122
### Changed
2223
* Attempting to upload a folder via the web file manager will now display a warning telling the user to use SFTP.

public/themes/pterodactyl/js/frontend/files/filemanager.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/themes/pterodactyl/js/frontend/files/filemanager.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/themes/pterodactyl/js/frontend/files/src/actions.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ class ActionsClass {
5555
showLoaderOnConfirm: true,
5656
inputValue: inputValue
5757
}, (val) => {
58+
if (val === false) {
59+
return false;
60+
}
61+
5862
$.ajax({
5963
type: 'POST',
6064
headers: {
@@ -100,6 +104,10 @@ class ActionsClass {
100104
showLoaderOnConfirm: true,
101105
inputValue: `${currentPath}${currentName}`,
102106
}, (val) => {
107+
if (val === false) {
108+
return false;
109+
}
110+
103111
$.ajax({
104112
type: 'POST',
105113
headers: {
@@ -233,6 +241,10 @@ class ActionsClass {
233241
showLoaderOnConfirm: true,
234242
inputValue: `${currentPath}${currentName}`,
235243
}, (val) => {
244+
if (val === false) {
245+
return false;
246+
}
247+
236248
$.ajax({
237249
type: 'POST',
238250
headers: {

resources/themes/pterodactyl/server/files/index.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
{!! Theme::js('vendor/lodash/lodash.js') !!}
4545
{!! Theme::js('vendor/siofu/client.min.js') !!}
4646
@if(App::environment('production'))
47-
{!! Theme::js('js/frontend/files/filemanager.min.js') !!}
47+
{!! Theme::js('js/frontend/files/filemanager.min.js?updated-cancel-buttons') !!}
4848
@else
4949
{!! Theme::js('js/frontend/files/src/index.js') !!}
5050
{!! Theme::js('js/frontend/files/src/contextmenu.js') !!}

0 commit comments

Comments
 (0)