Discard toast on /api connect

880233122c1351c67864970ea0f9e687f97319bc

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +2 -1Ignore whitespace
public/script.js+2 -1
@@ -8514,7 +8514,7 @@ async function connectAPISlash(args, text) {
8514 }8514 }
85158515
8516 const quiet = isTrueBoolean(args?.quiet);8516 const quiet = isTrueBoolean(args?.quiet);
8517 quiet ? jQuery() : toastr.info(`API set to ${text}, trying to connect..`);8517 const toast = quiet ? jQuery() : toastr.info(`API set to ${text}, trying to connect..`);
85188518
8519 try {8519 try {
8520 await waitUntilCondition(() => online_status !== 'no_connection', 10000, 100);8520 await waitUntilCondition(() => online_status !== 'no_connection', 10000, 100);
@@ -8523,6 +8523,7 @@ async function connectAPISlash(args, text) {
8523 console.log('Could not connect after 10 seconds, skipping.');8523 console.log('Could not connect after 10 seconds, skipping.');
8524 }8524 }
85258525
8526 toastr.clear(toast);
8526 return '';8527 return '';
8527}8528}
85288529