add loading screens instead of dropping the user into an app that's not ready to use
This commit is contained in:
parent
7f78d0ce1b
commit
84abba3e0b
6 changed files with 147 additions and 27 deletions
19
static/connection-status.js
Normal file
19
static/connection-status.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
export class ConnectionStatus extends HTMLElement {
|
||||
connectedCallback() {
|
||||
this.loggingInDialog = this.querySelector("dialog[name='logging-in-dialog']");
|
||||
this.loggingInThrobber = this.loggingInDialog.querySelector("rkgk-throbber");
|
||||
|
||||
// This is a progress dialog and shouldn't be closed.
|
||||
this.loggingInDialog.addEventListener("cancel", (event) => event.preventDefault());
|
||||
}
|
||||
|
||||
showLoggingIn() {
|
||||
this.loggingInDialog.showModal();
|
||||
}
|
||||
|
||||
hideLoggingIn() {
|
||||
this.loggingInDialog.close();
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("rkgk-connection-status", ConnectionStatus);
|
Loading…
Add table
Add a link
Reference in a new issue