Transpile ES6 to ES5 for filemanager. Closes #224
This commit is contained in:
parent
aa6e733ba5
commit
130aa6cc8a
9 changed files with 39 additions and 7 deletions
8
.babelrc
Normal file
8
.babelrc
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"presets": ["es2015"],
|
||||
"compact": true,
|
||||
"minified": true,
|
||||
"only": "public/js/files/*.js",
|
||||
"sourceMaps": "inline",
|
||||
"comments": false
|
||||
}
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -9,5 +9,4 @@ Homestead.yaml
|
|||
Vagrantfile
|
||||
Vagrantfile
|
||||
|
||||
node_modules
|
||||
.babelrc
|
||||
node_modules
|
|
@ -15,6 +15,10 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
|
|||
* Fixes bug that would allow adding the owner of a server as a subuser for that same server.
|
||||
* Fixes bug that would allow creating multiple subusers with the same email address.
|
||||
* Fixes bug where Sponge servers were improperly tagged as a spigot server in the daemon causing issues when booting or modifying configuration files.
|
||||
* Use transpiled ES6 -> ES5 filemanager code in browsers.
|
||||
|
||||
### Changed
|
||||
* Filemanager and EULA checking javascript is now written in pure ES6 code rather than as a blade-syntax template. This allows the use of babel to transpile into ES5 as a minified version.
|
||||
|
||||
## v0.5.5 (Bodacious Boreopterus)
|
||||
### Added
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
"dingo/api": "1.0.0-beta6",
|
||||
"aws/aws-sdk-php": "3.19.20",
|
||||
"predis/predis": "1.1.1",
|
||||
"laracasts/utilities": "^2.1"
|
||||
"laracasts/utilities": "2.1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"fzaninotto/faker": "~1.4",
|
||||
|
|
11
package.json
Normal file
11
package.json
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"name": "pterodactyl-panel",
|
||||
"devDependencies": {
|
||||
"babel-cli": "6.18.0",
|
||||
"babel-plugin-transform-strict-mode": "^6.18.0",
|
||||
"babel-preset-es2015": "6.18.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "./node_modules/babel-cli/bin/babel.js public/js/files --source-maps --out-file public/js/filemanager.min.js"
|
||||
}
|
||||
}
|
5
public/js/filemanager.min.js
vendored
Normal file
5
public/js/filemanager.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/js/filemanager.min.js.map
Normal file
1
public/js/filemanager.min.js.map
Normal file
File diff suppressed because one or more lines are too long
|
@ -62,7 +62,7 @@ class ContextMenuClass {
|
|||
|
||||
if (Pterodactyl.permissions.createFiles) {
|
||||
buildMenu += '<li class="divider"></li> \
|
||||
<li data-action="file"><a href="/server/{{ $server->uuidShort }}/files/add/?dir=' + newFilePath + '" class="text-muted"><i class="fa fa-fw fa-plus"></i> New File</a></li> \
|
||||
<li data-action="file"><a href="/server/'+ Pterodactyl.server.uuidShort +'/files/add/?dir=' + newFilePath + '" class="text-muted"><i class="fa fa-fw fa-plus"></i> New File</a></li> \
|
||||
<li data-action="folder"><a tabindex="-1" href="#"><i class="fa fa-fw fa-folder"></i> New Folder</a></li>';
|
||||
}
|
||||
|
||||
|
|
|
@ -58,9 +58,13 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{!! Theme::js('js/files/index.js') !!}
|
||||
{!! Theme::js('js/files/contextmenu.js') !!}
|
||||
{!! Theme::js('js/files/actions.js') !!}
|
||||
@if(App::environment('production'))
|
||||
{!! Theme::js('js/filemanager.min.js') !!}
|
||||
@else
|
||||
{!! Theme::js('js/files/index.js') !!}
|
||||
{!! Theme::js('js/files/contextmenu.js') !!}
|
||||
{!! Theme::js('js/files/actions.js') !!}
|
||||
@endif
|
||||
<script>
|
||||
$(window).load(function () {
|
||||
$('.server-files').addClass('active');
|
||||
|
|
Loading…
Reference in a new issue