-
-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The please wait - overlay was not shown correctly and didn't reacted to Alchemy.pleaseWaitOverlay() - toggle anymore.
- Loading branch information
1 parent
a51a933
commit d4511bd
Showing
4 changed files
with
14 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,18 @@ | ||
import { AlchemyHTMLElement } from "alchemy_admin/components/alchemy_html_element" | ||
|
||
class Overlay extends AlchemyHTMLElement { | ||
static properties = { | ||
show: { default: false }, | ||
text: { default: "" } | ||
} | ||
|
||
render() { | ||
this.id = `overlay` | ||
this.style.setProperty("display", this.show ? "block" : "none") | ||
|
||
return ` | ||
<alchemy-spinner></alchemy-spinner> | ||
<div id="overlay_text_box"> | ||
<span id="overlay_text">${this.text}</span> | ||
<span id="overlay_text">${this.getAttribute("text")}</span> | ||
</div> | ||
` | ||
} | ||
|
||
set show(value) { | ||
this.style.setProperty("display", value ? "block" : "none") | ||
} | ||
} | ||
|
||
customElements.define("alchemy-overlay", Overlay) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/** | ||
* To show the "Please wait" overlay. | ||
* Pass false to hide it. | ||
* @param {boolean,null} show | ||
* @param {boolean} show | ||
*/ | ||
export default function pleaseWaitOverlay(show) { | ||
customElements.get("alchemy-overlay").show = !!show | ||
export default function pleaseWaitOverlay(show = true) { | ||
document.querySelector("alchemy-overlay").show = !!show | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters