Fix ezq toast timeout and fix yarn build command for Python 3 (#1266)

* Fix `ezToast()` timeout
* Force `yarn build` to use Python 3
* Closes #1265
bulk-clear-sessions
Kevin Chung 2020-02-29 15:21:22 -05:00 committed by GitHub
parent 7ee47b0abe
commit 2f46f61ed0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 28 additions and 26 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -125,14 +125,16 @@ export function ezToast(args) {
});
}
let autohide = args.autohide || false;
let autohide = args.autohide !== false;
let animation = args.animation !== false;
let delay = args.delay || 10000; // 10 seconds
$("#ezq--notifications-toast-container").prepend(obj);
obj.toast({
autohide: autohide,
delay: delay
delay: delay,
animation: animation
});
obj.toast("show");
return obj;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -140,7 +140,7 @@ function getJSConfig(root, type, entries, mode) {
// Pretty nasty hack, would be a little better if this was purely JS
new WebpackShellPlugin({
onBuildEnd:[
mode == 'development' ? 'echo Skipping JS stub generation' : 'python -c \'exec(\"\"\"\nimport glob\nimport os\n\nstatic_js_dirs = [\n "CTFd/themes/core/static/js/**/*.dev.js",\n "CTFd/themes/admin/static/js/**/*.dev.js",\n]\n\nfor js_dir in static_js_dirs:\n for path in glob.glob(js_dir, recursive=True):\n if path.endswith(".dev.js"):\n path = path.replace(".dev.js", ".min.js")\n if os.path.isfile(path) is False:\n open(path, "a").close()\n\"\"\")\''
mode == 'development' ? 'echo Skipping JS stub generation' : 'python3 -c \'exec(\"\"\"\nimport glob\nimport os\n\nstatic_js_dirs = [\n "CTFd/themes/core/static/js/**/*.dev.js",\n "CTFd/themes/admin/static/js/**/*.dev.js",\n]\n\nfor js_dir in static_js_dirs:\n for path in glob.glob(js_dir, recursive=True):\n if path.endswith(".dev.js"):\n path = path.replace(".dev.js", ".min.js")\n if os.path.isfile(path) is False:\n open(path, "a").close()\n\"\"\")\''
],
safe: true,
}),