This commit is contained in:
thororen1234 2024-10-14 19:33:17 -04:00
parent 75fac79ad1
commit deceb2ba97
13 changed files with 186 additions and 58 deletions

View file

@ -83,14 +83,16 @@ export default definePlugin({
const connectionSuccessful = await new Promise(res => setTimeout(() => res(ws.readyState === WebSocket.OPEN), 1000)); // check if open after 1s
if (!connectionSuccessful) {
showNotice("Failed to connect to arRPC, is it running?", "Retry", () => { // show notice about failure to connect, with retry/ignore
showNotice("Failed to connect to arRPC, is it running?", "Retry", () => {
// show notice about failure to connect, with retry/ignore
popNotice();
this.start();
});
return;
}
Toasts.show({ // show toast on success
Toasts.show({
// show toast on success
message: "Connected to arRPC",
type: Toasts.Type.SUCCESS,
id: Toasts.genId(),