diff --git a/components/MessageArea.vue b/components/MessageArea.vue index 7612243..18b9ac5 100644 --- a/components/MessageArea.vue +++ b/components/MessageArea.vue @@ -158,10 +158,12 @@ if (accessToken && apiBase) { function sendMessage(e: Event) { e.preventDefault(); - const text = messageInput.value; - console.log("text:", text); - if (text) { - ws.send(text); + const message = { + message: messageInput.value + } + console.log("message:", message); + if (message.message) { + ws.send(JSON.stringify(message)); messageInput.value = ""; console.log("MESSAGE SENT!!!"); } diff --git a/composables/auth.ts b/composables/auth.ts index 0ac2e8b..b23a67b 100644 --- a/composables/auth.ts +++ b/composables/auth.ts @@ -37,13 +37,19 @@ export const useAuth = () => { //await fetchUser(); } - async function logout(password: string) { - console.log("password:", password); + async function logout() { console.log("access:", accessToken.value); - const hashedPass = await hashPassword(password); - console.log("hashed"); - const res = await fetchWithApi("/auth/revoke", { + await fetchWithApi("/auth/logout", { method: "GET", credentials: "include" }); + clearAuth(); + + return await navigateTo("/login"); + } + + async function revoke(password: string) { + const hashedPass = await hashPassword(password); + + await fetchWithApi("/auth/revoke", { method: "POST", body: { @@ -54,10 +60,6 @@ export const useAuth = () => { clearAuth(); } - async function revoke() { - clearAuth(); - } - async function refresh() { console.log("refreshing"); const res = await fetchWithApi("/auth/refresh", { diff --git a/nuxt.config.ts b/nuxt.config.ts index 63d9372..05a40fa 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -27,7 +27,9 @@ export default defineNuxtConfig({ runtimeConfig: { public: { apiVersion: 1, - messageGroupingMaxDifference: 300000 + messageGroupingMaxDifference: 300000, + buildTimeString: new Date().toISOString(), + gitHash: process.env.GIT_SHORT_REV || "N/A", } }, /* nitro: { diff --git a/pages/servers/[serverId]/channels/[channelId].vue b/pages/servers/[serverId]/channels/[channelId].vue index 699b9a3..01e89f0 100644 --- a/pages/servers/[serverId]/channels/[channelId].vue +++ b/pages/servers/[serverId]/channels/[channelId].vue @@ -100,6 +100,7 @@ function handleMemberClick(member: GuildMemberResponse) { display: flex; flex-direction: column; overflow-y: scroll; + max-height: 92dvh; padding-left: 1dvw; padding-right: 1dvw; margin-top: 1dvh; diff --git a/pages/settings.vue b/pages/settings.vue index 991d046..bd1a484 100644 --- a/pages/settings.vue +++ b/pages/settings.vue @@ -2,8 +2,8 @@