From aa5628d077ba0813f1771f93f23301bfe2ec29c0 Mon Sep 17 00:00:00 2001 From: vvandenb Date: Sun, 19 Mar 2023 16:12:36 +0100 Subject: [PATCH] * Removed last alerts --- front/volume/src/App.svelte | 8 ++++---- front/volume/src/Auth.ts | 5 +++-- front/volume/src/components/Channels.svelte | 4 +--- front/volume/src/components/Friends.svelte | 5 +++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/front/volume/src/App.svelte b/front/volume/src/App.svelte index e0add26..ec7a916 100644 --- a/front/volume/src/App.svelte +++ b/front/volume/src/App.svelte @@ -24,7 +24,7 @@ import Chat from "./components/Chat.svelte"; import Channels, { formatChannelNames, type chatMessagesType } from "./components/Channels.svelte"; import Leaderboard from "./components/Leaderboard.svelte"; - import { popup } from "./components/Alert/content"; + import { popup, show_popup } from "./components/Alert/content"; import Pong from "./components/Pong/Pong.svelte"; import type { ChannelsType } from "./components/Channels.svelte"; import { API_URL } from "./Auth"; @@ -115,13 +115,13 @@ await formatChannelNames(DMChannel) setAppState(APPSTATE.CHANNELS + "#" + DMChannel[0].name) } else { - alert("Error creating DM"); + show_popup("Error: Couldn't create DM.", false) } } else { - alert("Error creating DM"); + show_popup("Error: Couldn't create DM.", false) } }).catch(() => { - alert("Error creating DM"); + show_popup("Error: Couldn't create DM.", false) }) } } diff --git a/front/volume/src/Auth.ts b/front/volume/src/Auth.ts index cc783a5..8ba8953 100644 --- a/front/volume/src/Auth.ts +++ b/front/volume/src/Auth.ts @@ -1,4 +1,5 @@ import { writable } from "svelte/store"; +import { show_popup } from "./components/Alert/content"; let _user = localStorage.getItem("user"); export const store = writable(_user ? JSON.parse(_user) : null); @@ -35,9 +36,9 @@ export function verify() { mode: "cors", credentials: "include", }); - alert( + show_popup( "We have sent you an email to verify your account. Check the mailbox which is linked to your 42's profile." - ); + , false); } export function logout() { diff --git a/front/volume/src/components/Channels.svelte b/front/volume/src/components/Channels.svelte index add9430..2970e74 100644 --- a/front/volume/src/components/Channels.svelte +++ b/front/volume/src/components/Channels.svelte @@ -1,7 +1,5 @@ @@ -28,6 +28,7 @@