|
@@ -633,7 +633,7 @@ class App {
|
|
* Pops up a message to the user and writes it to the console log.
|
|
* Pops up a message to the user and writes it to the console log.
|
|
*
|
|
*
|
|
* @param {string} str - The message to display (HTML supported)
|
|
* @param {string} str - The message to display (HTML supported)
|
|
- * @param {number} timeout - The number of milliseconds before the alert closes automatically
|
|
|
|
|
|
+ * @param {number} [timeout=0] - The number of milliseconds before the alert closes automatically
|
|
* 0 for never (until the user closes it)
|
|
* 0 for never (until the user closes it)
|
|
* @param {boolean} [silent=false] - Don't show the message in the popup, only print it to the
|
|
* @param {boolean} [silent=false] - Don't show the message in the popup, only print it to the
|
|
* console
|
|
* console
|
|
@@ -646,14 +646,12 @@ class App {
|
|
* // Pops up a box with the message "Happy Christmas!" that will disappear after 5 seconds.
|
|
* // Pops up a box with the message "Happy Christmas!" that will disappear after 5 seconds.
|
|
* this.alert("Happy Christmas!", 5000);
|
|
* this.alert("Happy Christmas!", 5000);
|
|
*/
|
|
*/
|
|
- alert(str, timeout, silent) {
|
|
|
|
|
|
+ alert(str, timeout=0, silent=false) {
|
|
const time = new Date();
|
|
const time = new Date();
|
|
|
|
|
|
log.info("[" + time.toLocaleString() + "] " + str);
|
|
log.info("[" + time.toLocaleString() + "] " + str);
|
|
if (silent) return;
|
|
if (silent) return;
|
|
|
|
|
|
- timeout = timeout || 0;
|
|
|
|
-
|
|
|
|
this.currentSnackbar = $.snackbar({
|
|
this.currentSnackbar = $.snackbar({
|
|
content: str,
|
|
content: str,
|
|
timeout: timeout,
|
|
timeout: timeout,
|