Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use modernized waitMe plugin #3213

Draft
wants to merge 1 commit into
base: development
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"nprogress": "0.2.0",
"qrious": "4.0.2",
"select2": "4.0.13",
"waitme": "1.19.0"
"waitme-js": "1.0.0"
},
"devDependencies": {
"autoprefixer": "^10.4.20",
Expand Down
4 changes: 2 additions & 2 deletions scripts/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ function loadingOverlayTimeoutCallback(reloadAfterTimeout) {
if (reloadAfterTimeout) {
location.reload();
} else {
$(".wrapper").waitMe("hide");
WaitMe.hideAll();
}
})
.fail(function () {
Expand All @@ -668,7 +668,7 @@ function loadingOverlayTimeoutCallback(reloadAfterTimeout) {

function loadingOverlay(reloadAfterTimeout = false) {
NProgress.start();
$(".wrapper").waitMe({
new WaitMe(".wrapper", {
effect: "bounce",
text: "Pi-hole is currently applying your changes...",
bg: "rgba(0,0,0,0.7)",
Expand Down
4 changes: 2 additions & 2 deletions scripts/lua/header.lp
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,5 @@ if startsWith(scriptname, 'groups') then
<script src="<?=pihole.fileversion('vendor/bootstrap-notify/bootstrap-notify.min.js')?>"></script>
<script src="<?=pihole.fileversion('vendor/font-awesome/all.min.js')?>"></script>
<script src="<?=pihole.fileversion('scripts/js/utils.js')?>"></script>
<script src="<?=pihole.fileversion('vendor/waitMe/waitMe.min.js')?>"></script>
<link rel="stylesheet" href="<?=pihole.fileversion('vendor/waitMe/waitMe.min.css')?>">
<script src="<?=pihole.fileversion('vendor/waitMe-js/modernized-waitme-min.js')?>"></script>
<link rel="stylesheet" href="<?=pihole.fileversion('vendor/waitMe-js/waitMe.min.css')?>">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason this CSS is here? ideally it should be placed along with the rest vendor CSS files

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have a look at the folder structure. We don't separate by Js and css anymore, but created a folder for each dependencies containing all their necessary stuff. This made it way easier to keep things up-to-date

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point here is that CSS is better of grouped together because it helps the browser to plan ahead.

By mixing JS and CSS files we are certainly not helping. I would keep the CSS file along with the rest.

1 change: 1 addition & 0 deletions vendor/waitMe-js/modernized-waitme-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
13 changes: 0 additions & 13 deletions vendor/waitMe/waitMe.min.js

This file was deleted.

Loading