From 8c92a7ad0cba673cb2758f01b5aa6805c004108d Mon Sep 17 00:00:00 2001 From: JustTemmie <47639983+JustTemmie@users.noreply.github.com> Date: Wed, 2 Jul 2025 20:17:30 +0200 Subject: [PATCH 01/85] feat: Use actual server icons instead of placeholder --- layouts/client.vue | 50 +++++++--------------------------------------- 1 file changed, 7 insertions(+), 43 deletions(-) diff --git a/layouts/client.vue b/layouts/client.vue index 73a40d6..0f79cbf 100644 --- a/layouts/client.vue +++ b/layouts/client.vue @@ -12,7 +12,8 @@
- + +
@@ -26,48 +27,6 @@ import type { GuildResponse } from '~/types/interfaces'; const loading = useState("loading", () => false); const guilds: GuildResponse[] | undefined = await fetchWithApi("/me/guilds"); - -//const servers = await fetchWithApi("/servers") as { uuid: string, name: string, description: string }[]; -//console.log("servers:", servers); -const members = [ - { - id: "3287484395", - displayName: "SauceyRed" - }, - { - id: "3287484395", - displayName: "SauceyRed" - }, - { - id: "3287484395", - displayName: "SauceyRed" - }, - { - id: "3287484395", - displayName: "SauceyRed" - }, - { - id: "3287484395", - displayName: "SauceyRed" - }, - { - id: "3287484395", - displayName: "SauceyRed" - }, - { - id: "3287484395", - displayName: "SauceyRed" - }, - { - id: "3287484395", - displayName: "SauceyRed" - }, - { - id: "3287484395", - displayName: "SauceyRed" - } -]; - diff --git a/components/Message.vue b/components/Message.vue index 5cd7773..05392a0 100644 --- a/components/Message.vue +++ b/components/Message.vue @@ -81,7 +81,7 @@ onMounted(async () => { text-align: left; /* border: 1px solid lightcoral; */ display: grid; - grid-template-columns: 2dvw 1fr; + grid-template-columns: 2rem 1fr; align-items: center; column-gap: 1dvw; width: 100%; @@ -129,10 +129,11 @@ onMounted(async () => { } .left-column { + min-width: 2rem; display: flex; + justify-content: center; text-align: center; white-space: nowrap; - } .author-username { diff --git a/components/UserArea.vue b/components/UserArea.vue new file mode 100644 index 0000000..d922c3f --- /dev/null +++ b/components/UserArea.vue @@ -0,0 +1,20 @@ + + + + + \ No newline at end of file diff --git a/components/UserPopup.vue b/components/UserPopup.vue index 092e7d5..befe4f5 100644 --- a/components/UserPopup.vue +++ b/components/UserPopup.vue @@ -1,6 +1,8 @@ \ No newline at end of file From 768b011961d52159500be5c7b2f7328d9a2d11ef Mon Sep 17 00:00:00 2001 From: JustTemmie <47639983+JustTemmie@users.noreply.github.com> Date: Sat, 5 Jul 2025 17:02:22 +0200 Subject: [PATCH 30/85] feat: add theme previews --- .../Settings/AppSettings/Appearance.vue | 58 ++++++++++++++++++- nuxt.config.ts | 3 + public/themes/ash.css | 19 ++++++ public/themes/ash.json | 6 ++ public/themes/dark.json | 6 ++ public/themes/default-themes.json | 4 -- public/themes/light.json | 6 ++ 7 files changed, 96 insertions(+), 6 deletions(-) create mode 100644 public/themes/ash.css create mode 100644 public/themes/ash.json create mode 100644 public/themes/dark.json delete mode 100644 public/themes/default-themes.json create mode 100644 public/themes/light.json diff --git a/components/Settings/AppSettings/Appearance.vue b/components/Settings/AppSettings/Appearance.vue index 51b06ee..59e417c 100644 --- a/components/Settings/AppSettings/Appearance.vue +++ b/components/Settings/AppSettings/Appearance.vue @@ -1,12 +1,66 @@ \ No newline at end of file + display: inline-block; + text-align: center; + align-content: center; +} + +.theme-title { + font-size: .8em; + line-height: 6em; /* same height as the parent to centre it vertically */ +} + diff --git a/nuxt.config.ts b/nuxt.config.ts index 05a40fa..489e1b8 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -30,6 +30,9 @@ export default defineNuxtConfig({ messageGroupingMaxDifference: 300000, buildTimeString: new Date().toISOString(), gitHash: process.env.GIT_SHORT_REV || "N/A", + defaultThemes: [ + "light", "ash", "dark" + ] } }, /* nitro: { diff --git a/public/themes/ash.css b/public/themes/ash.css new file mode 100644 index 0000000..b685551 --- /dev/null +++ b/public/themes/ash.css @@ -0,0 +1,19 @@ +:root { + --text-color: #f0e5e0; + --secondary-text-color: #e8e0db; + + --chat-background-color: #2f2e2d; + --chat-highlighted-background-color: #3f3b38; + --sidebar-background-color: #3e3a37; + --sidebar-highlighted-background-color: #46423b; + --topbar-background-color: #3a3733; + + --padding-color: #e0e0e0; + + --primary-color: #f07028; + --primary-highlighted-color: #f28f4b; + --secondary-color: #683820; + --secondary-highlighted-color: #885830; + --accent-color: #a04b24; + --accent-highlighted-color: #b86038; +} \ No newline at end of file diff --git a/public/themes/ash.json b/public/themes/ash.json new file mode 100644 index 0000000..fb9cc93 --- /dev/null +++ b/public/themes/ash.json @@ -0,0 +1,6 @@ +{ + "displayName": "Ash", + "previewGradient": "45deg, #2f2e2d, #46423b", + "complementaryColor": "white", + "themeData": "ash.css" +} \ No newline at end of file diff --git a/public/themes/dark.json b/public/themes/dark.json new file mode 100644 index 0000000..3cecba6 --- /dev/null +++ b/public/themes/dark.json @@ -0,0 +1,6 @@ +{ + "displayName": "Dark", + "previewGradient": "45deg, #1f1e1d, #36322b", + "complementaryColor": "white", + "themeData": "dark.css" +} \ No newline at end of file diff --git a/public/themes/default-themes.json b/public/themes/default-themes.json deleted file mode 100644 index fb9478d..0000000 --- a/public/themes/default-themes.json +++ /dev/null @@ -1,4 +0,0 @@ -[ - "dark.css", - "light.css" -] \ No newline at end of file diff --git a/public/themes/light.json b/public/themes/light.json new file mode 100644 index 0000000..fe0b678 --- /dev/null +++ b/public/themes/light.json @@ -0,0 +1,6 @@ +{ + "displayName": "Light", + "previewGradient": "45deg, #f0ebe8, #d4d0ca", + "complementaryColor": "black", + "themeData": "light.css" +} \ No newline at end of file From c03f72ceccf81f7501b4ae71d711959bdf66465d Mon Sep 17 00:00:00 2001 From: JustTemmie <47639983+JustTemmie@users.noreply.github.com> Date: Sat, 5 Jul 2025 17:05:40 +0200 Subject: [PATCH 31/85] feat: implement "hash navigation" for settings --- pages/settings.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pages/settings.vue b/pages/settings.vue index 0f297e3..01b78d7 100644 --- a/pages/settings.vue +++ b/pages/settings.vue @@ -40,10 +40,10 @@ From 441dc0c15cdb3391db283e89ec678970ca9e6b1c Mon Sep 17 00:00:00 2001 From: JustTemmie <47639983+JustTemmie@users.noreply.github.com> Date: Sat, 5 Jul 2025 17:36:08 +0200 Subject: [PATCH 33/85] feat: actually add theme switching :mind_blown: --- .../Settings/AppSettings/Appearance.vue | 29 ++++++++++++++++++- public/themes/ash.json | 2 +- public/themes/dark.json | 2 +- public/themes/light.json | 2 +- 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/components/Settings/AppSettings/Appearance.vue b/components/Settings/AppSettings/Appearance.vue index 68759d9..0f7b504 100644 --- a/components/Settings/AppSettings/Appearance.vue +++ b/components/Settings/AppSettings/Appearance.vue @@ -5,7 +5,11 @@

THEMES

- + {{ theme.displayName }} @@ -25,23 +29,45 @@ const runtimeConfig = useRuntimeConfig() const defaultThemes = runtimeConfig.public.defaultThemes const baseURL = runtimeConfig.app.baseURL; +let themeLinkElement: HTMLLinkElement | null = null; const themes: Array = [] interface Theme { + ID: string displayName: string previewGradient: string complementaryColor: string themeURL: string } +function changeTheme(ID: string, URL: string) { + if (themeLinkElement && themeLinkElement.getAttribute('href') === `${baseURL}themes/${URL}`) { + return; + } + + localStorage.setItem("selectedTheme", ID); + + // if the theme didn't originally load for some reason, create it + if (!themeLinkElement) { + themeLinkElement = document.createElement('link'); + themeLinkElement.rel = 'stylesheet'; + document.head.appendChild(themeLinkElement); + } + + themeLinkElement.href = `${baseURL}themes/${URL}`; +} const fetchThemes = async () => { for (const theme of defaultThemes) { const themeConfig = await fetch(`${baseURL}themes/${theme}.json`) const themeConfigJson = await themeConfig.json() as Theme + themeConfigJson.ID = theme + themes.push(themeConfigJson) } + + console.log(themes) } await fetchThemes() @@ -67,6 +93,7 @@ await fetchThemes() display: inline-block; text-align: center; align-content: center; + cursor: pointer; } .theme-title { diff --git a/public/themes/ash.json b/public/themes/ash.json index fb9cc93..1bd7670 100644 --- a/public/themes/ash.json +++ b/public/themes/ash.json @@ -2,5 +2,5 @@ "displayName": "Ash", "previewGradient": "45deg, #2f2e2d, #46423b", "complementaryColor": "white", - "themeData": "ash.css" + "themeURL": "ash.css" } \ No newline at end of file diff --git a/public/themes/dark.json b/public/themes/dark.json index 3cecba6..0ff69be 100644 --- a/public/themes/dark.json +++ b/public/themes/dark.json @@ -2,5 +2,5 @@ "displayName": "Dark", "previewGradient": "45deg, #1f1e1d, #36322b", "complementaryColor": "white", - "themeData": "dark.css" + "themeURL": "dark.css" } \ No newline at end of file diff --git a/public/themes/light.json b/public/themes/light.json index fe0b678..3745abb 100644 --- a/public/themes/light.json +++ b/public/themes/light.json @@ -2,5 +2,5 @@ "displayName": "Light", "previewGradient": "45deg, #f0ebe8, #d4d0ca", "complementaryColor": "black", - "themeData": "light.css" + "themeURL": "light.css" } \ No newline at end of file From 6abfd8e44bcf8f232e251e64269e7532612ec42f Mon Sep 17 00:00:00 2001 From: JustTemmie <47639983+JustTemmie@users.noreply.github.com> Date: Sat, 5 Jul 2025 19:02:57 +0200 Subject: [PATCH 34/85] chore: pascalCase --- components/Settings/AppSettings/Appearance.vue | 16 ++++++++-------- public/themes/ash.json | 2 +- public/themes/dark.json | 2 +- public/themes/light.json | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/components/Settings/AppSettings/Appearance.vue b/components/Settings/AppSettings/Appearance.vue index 0f7b504..82e3845 100644 --- a/components/Settings/AppSettings/Appearance.vue +++ b/components/Settings/AppSettings/Appearance.vue @@ -8,7 +8,7 @@ {{ theme.displayName }} @@ -34,19 +34,19 @@ let themeLinkElement: HTMLLinkElement | null = null; const themes: Array = [] interface Theme { - ID: string + id: string displayName: string previewGradient: string complementaryColor: string - themeURL: string + themeUrl: string } -function changeTheme(ID: string, URL: string) { - if (themeLinkElement && themeLinkElement.getAttribute('href') === `${baseURL}themes/${URL}`) { +function changeTheme(id: string, url: string) { + if (themeLinkElement && themeLinkElement.getAttribute('href') === `${baseURL}themes/${url}`) { return; } - localStorage.setItem("selectedTheme", ID); + localStorage.setItem("selectedTheme", id); // if the theme didn't originally load for some reason, create it if (!themeLinkElement) { @@ -55,14 +55,14 @@ function changeTheme(ID: string, URL: string) { document.head.appendChild(themeLinkElement); } - themeLinkElement.href = `${baseURL}themes/${URL}`; + themeLinkElement.href = `${baseURL}themes/${url}`; } const fetchThemes = async () => { for (const theme of defaultThemes) { const themeConfig = await fetch(`${baseURL}themes/${theme}.json`) const themeConfigJson = await themeConfig.json() as Theme - themeConfigJson.ID = theme + themeConfigJson.id = theme themes.push(themeConfigJson) } diff --git a/public/themes/ash.json b/public/themes/ash.json index 1bd7670..d5d2a59 100644 --- a/public/themes/ash.json +++ b/public/themes/ash.json @@ -2,5 +2,5 @@ "displayName": "Ash", "previewGradient": "45deg, #2f2e2d, #46423b", "complementaryColor": "white", - "themeURL": "ash.css" + "themeUrl": "ash.css" } \ No newline at end of file diff --git a/public/themes/dark.json b/public/themes/dark.json index 0ff69be..4731d43 100644 --- a/public/themes/dark.json +++ b/public/themes/dark.json @@ -2,5 +2,5 @@ "displayName": "Dark", "previewGradient": "45deg, #1f1e1d, #36322b", "complementaryColor": "white", - "themeURL": "dark.css" + "themeUrl": "dark.css" } \ No newline at end of file diff --git a/public/themes/light.json b/public/themes/light.json index 3745abb..b95c78b 100644 --- a/public/themes/light.json +++ b/public/themes/light.json @@ -2,5 +2,5 @@ "displayName": "Light", "previewGradient": "45deg, #f0ebe8, #d4d0ca", "complementaryColor": "black", - "themeURL": "light.css" + "themeUrl": "light.css" } \ No newline at end of file From 7098dda6b4f1a6d530978caa8120d2552ac303be Mon Sep 17 00:00:00 2001 From: JustTemmie <47639983+JustTemmie@users.noreply.github.com> Date: Sat, 5 Jul 2025 19:03:24 +0200 Subject: [PATCH 35/85] fix: remove un-necessary imports --- pages/settings.vue | 3 --- 1 file changed, 3 deletions(-) diff --git a/pages/settings.vue b/pages/settings.vue index 01b78d7..17558b1 100644 --- a/pages/settings.vue +++ b/pages/settings.vue @@ -40,9 +40,6 @@ + + \ No newline at end of file From bb5ff3750967a938ad8daec495c20893d264cbef Mon Sep 17 00:00:00 2001 From: JustTemmie <47639983+JustTemmie@users.noreply.github.com> Date: Tue, 8 Jul 2025 20:58:40 +0200 Subject: [PATCH 53/85] fix: put the home page into index.vue instead --- layouts/client.vue | 2 +- pages/home.vue | 30 ------------------------------ pages/index.vue | 15 ++++++++++++++- 3 files changed, 15 insertions(+), 32 deletions(-) delete mode 100644 pages/home.vue diff --git a/layouts/client.vue b/layouts/client.vue index 516658c..a1ee86d 100644 --- a/layouts/client.vue +++ b/layouts/client.vue @@ -7,7 +7,7 @@
- +
diff --git a/pages/home.vue b/pages/home.vue deleted file mode 100644 index 4182eb3..0000000 --- a/pages/home.vue +++ /dev/null @@ -1,30 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/index.vue b/pages/index.vue index f970926..4182eb3 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1,6 +1,19 @@ From bd6307f16e06cc2b53b62ab2017c9cfdf29c7ca8 Mon Sep 17 00:00:00 2001 From: JustTemmie <47639983+JustTemmie@users.noreply.github.com> Date: Tue, 8 Jul 2025 21:00:05 +0200 Subject: [PATCH 54/85] fix: rephrase sentace from "server" to "guild" --- pages/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.vue b/pages/index.vue index 4182eb3..41deadf 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -7,7 +7,7 @@ Welcome to gorb :3

- Click on a server to the left to view a guild. + Click on a guild to the left to view a guild.
Or click the button in the bottom left to join a guild.

From 8932070fcc64fae57036b9e5fc4d08398e236d68 Mon Sep 17 00:00:00 2001 From: JustTemmie <47639983+JustTemmie@users.noreply.github.com> Date: Tue, 8 Jul 2025 21:11:14 +0200 Subject: [PATCH 55/85] feat: spice up the home bar --- layouts/client.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/layouts/client.vue b/layouts/client.vue index a1ee86d..9ce451e 100644 --- a/layouts/client.vue +++ b/layouts/client.vue @@ -3,7 +3,9 @@
- main bar + + gorb!!!!! +
@@ -61,6 +63,11 @@ const guilds: GuildResponse[] | undefined = await fetchWithApi("/me/guilds"); background-color: var(--topbar-background-color); padding-left: 5dvw; padding-right: 5dvw; + +} + +.homebar-item { + width: 100dvw; } #client-root>div:nth-child(-n+4) { From 730b0cb1dcece7264d81e07902e1576e7d92b1cb Mon Sep 17 00:00:00 2001 From: JustTemmie <47639983+JustTemmie@users.noreply.github.com> Date: Wed, 9 Jul 2025 00:25:52 +0200 Subject: [PATCH 56/85] refactor: change the client from table to flexbox this makes the server, channel, and member list a constant size, making the text messages take up the entire remaining width this also fixes the text wrapping you have already fixed on one of your branches this change is required if we want to make the member list toggelable, or channel list resizable --- components/Channel.vue | 2 +- layouts/client.vue | 89 ++++++++----------- .../[serverId]/channels/[channelId].vue | 13 ++- 3 files changed, 46 insertions(+), 58 deletions(-) diff --git a/components/Channel.vue b/components/Channel.vue index 0f48323..6bdc28b 100644 --- a/components/Channel.vue +++ b/components/Channel.vue @@ -30,7 +30,7 @@ const isCurrentChannel = props.uuid == props.currentUuid; .channel-list-link-container { text-align: left; display: flex; - height: 4dvh; + height: 1.5em; white-space: nowrap; align-items: center; } diff --git a/layouts/client.vue b/layouts/client.vue index a1ee86d..b98e304 100644 --- a/layouts/client.vue +++ b/layouts/client.vue @@ -6,21 +6,23 @@ main bar
-
- - - -
- - - +
+
+ + + +
+ + + + +
+ +
- - - +
-
@@ -34,11 +36,10 @@ const guilds: GuildResponse[] | undefined = await fetchWithApi("/me/guilds"); \ No newline at end of file diff --git a/pages/servers/[serverId]/channels/[channelId].vue b/pages/servers/[serverId]/channels/[channelId].vue index 6bdcc7c..b5ee86a 100644 --- a/pages/servers/[serverId]/channels/[channelId].vue +++ b/pages/servers/[serverId]/channels/[channelId].vue @@ -91,9 +91,8 @@ function handleMemberClick(member: GuildMemberResponse) { } #members-container { - padding-top: 1dvh; - padding-left: 1dvw; - padding-right: 1dvw; + min-width: 12rem; + padding-top: 1em; border-left: 1px solid var(--padding-color); } @@ -102,14 +101,14 @@ function handleMemberClick(member: GuildMemberResponse) { flex-direction: column; overflow-y: scroll; max-height: 92dvh; - padding-left: 1dvw; - padding-right: 1dvw; + padding-left: 1.3em; + padding-right: 1.3em; margin-top: 1dvh; } .member-item { display: grid; - grid-template-columns: 2dvw 1fr; + grid-template-columns: 1.5em 1fr; margin-top: .5em; margin-bottom: .5em; gap: 1em; @@ -121,7 +120,7 @@ function handleMemberClick(member: GuildMemberResponse) { #channels-list { display: flex; flex-direction: column; - gap: 1dvh; + gap: .5em; } .member-avatar { From 9a2fe8fb373c006ac074031057d0fe4e5b90fa62 Mon Sep 17 00:00:00 2001 From: JustTemmie <47639983+JustTemmie@users.noreply.github.com> Date: Wed, 9 Jul 2025 00:43:23 +0200 Subject: [PATCH 57/85] refactor: change a lot of dynamic sizes to em and rem this makes the client feel a LOT snappier --- components/Button.vue | 2 +- components/Channel.vue | 4 ++-- components/MessageArea.vue | 1 + layouts/client.vue | 20 ++++++++-------- .../[serverId]/channels/[channelId].vue | 23 ++++++++++--------- 5 files changed, 26 insertions(+), 24 deletions(-) diff --git a/components/Button.vue b/components/Button.vue index fb44cf2..66706de 100644 --- a/components/Button.vue +++ b/components/Button.vue @@ -21,7 +21,7 @@ const props = defineProps<{ background-color: var(--primary-color); color: var(--text-color); - padding: 0.7dvh 1.2dvw; + padding: 0.4em 0.75em; font-size: 1.1em; transition: background-color 0.2s; diff --git a/components/Channel.vue b/components/Channel.vue index 6bdc28b..98f210e 100644 --- a/components/Channel.vue +++ b/components/Channel.vue @@ -23,8 +23,8 @@ const isCurrentChannel = props.uuid == props.currentUuid; .channel-list-link { text-decoration: none; color: inherit; - padding-left: .5dvw; - padding-right: .5dvw; + padding-left: .25em; + padding-right: .25em; } .channel-list-link-container { diff --git a/components/MessageArea.vue b/components/MessageArea.vue index 18b9ac5..244b239 100644 --- a/components/MessageArea.vue +++ b/components/MessageArea.vue @@ -246,6 +246,7 @@ router.beforeEach((to, from, next) => { padding-left: 1dvw; padding-right: 1dvw; overflow: hidden; + flex-grow: 1; } #message-box { diff --git a/layouts/client.vue b/layouts/client.vue index b98e304..469800d 100644 --- a/layouts/client.vue +++ b/layouts/client.vue @@ -74,27 +74,27 @@ const guilds: GuildResponse[] | undefined = await fetchWithApi("/me/guilds"); #left-column { display: flex; flex-direction: column; - gap: 2dvh; - padding-left: .5dvw; - padding-right: .5dvw; + gap: .75em; + padding-left: .25em; + padding-right: .25em; border-right: 1px solid var(--padding-color); background: var(--optional-sidebar-background); background-color: var(--sidebar-background-color); - padding-top: 1.5dvh; + padding-top: .5em; } #servers-list { display: flex; flex-direction: column; - gap: 1dvh; + gap: 1em; width: 3.2rem; } #middle-left-column { - padding-left: 1dvw; - padding-right: 1dvw; + padding-left: .25em; + padding-right: .25em; border-right: 1px solid var(--padding-color); - min-width: 10rem; + min-width: 10em; overflow-y: scroll; overflow-x: hidden; } @@ -106,12 +106,12 @@ const guilds: GuildResponse[] | undefined = await fetchWithApi("/me/guilds"); #home-button { border-bottom: 1px solid var(--padding-color); - padding-bottom: 1dvh; + padding-bottom: .375em; } #settings-menu { position: absolute; - bottom: .25dvh + bottom: .25em } \ No newline at end of file diff --git a/pages/servers/[serverId]/channels/[channelId].vue b/pages/servers/[serverId]/channels/[channelId].vue index b5ee86a..04d56f9 100644 --- a/pages/servers/[serverId]/channels/[channelId].vue +++ b/pages/servers/[serverId]/channels/[channelId].vue @@ -27,6 +27,7 @@
+
@@ -83,35 +84,35 @@ function handleMemberClick(member: GuildMemberResponse) { From a6572c20f971c4f0d8e05d99f6fac86f29c59541 Mon Sep 17 00:00:00 2001 From: JustTemmie <47639983+JustTemmie@users.noreply.github.com> Date: Wed, 9 Jul 2025 01:04:37 +0200 Subject: [PATCH 59/85] fix: remove accidental duplication of member list this was for local testing, forgot to remove it --- pages/servers/[serverId]/channels/[channelId].vue | 1 - 1 file changed, 1 deletion(-) diff --git a/pages/servers/[serverId]/channels/[channelId].vue b/pages/servers/[serverId]/channels/[channelId].vue index 04d56f9..d0c702d 100644 --- a/pages/servers/[serverId]/channels/[channelId].vue +++ b/pages/servers/[serverId]/channels/[channelId].vue @@ -27,7 +27,6 @@
-
From f1bec945fe0cd7a23eccb9a499a0b11da4de951a Mon Sep 17 00:00:00 2001 From: JustTemmie <47639983+JustTemmie@users.noreply.github.com> Date: Wed, 9 Jul 2025 03:36:30 +0200 Subject: [PATCH 60/85] feat: multiline message box this implementation SUCKS and i probably have to write an entirely custom solution where every line is a div or something --- components/MessageArea.vue | 64 +++++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 25 deletions(-) diff --git a/components/MessageArea.vue b/components/MessageArea.vue index 9bf6df8..34a79fa 100644 --- a/components/MessageArea.vue +++ b/components/MessageArea.vue @@ -14,9 +14,11 @@
- - +
- + +
+
+
+
-
From 0afb269788bcb504cbc8540575dc2b331c0b4fd3 Mon Sep 17 00:00:00 2001 From: JustTemmie <47639983+JustTemmie@users.noreply.github.com> Date: Mon, 7 Jul 2025 20:40:49 +0200 Subject: [PATCH 79/85] feat: start adding back button for settings --- pages/settings.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pages/settings.vue b/pages/settings.vue index 1380283..4c36914 100644 --- a/pages/settings.vue +++ b/pages/settings.vue @@ -3,6 +3,13 @@
From 323178af6b0ad99c346de7088dceafb02233336f Mon Sep 17 00:00:00 2001 From: JustTemmie <47639983+JustTemmie@users.noreply.github.com> Date: Thu, 10 Jul 2025 16:10:55 +0200 Subject: [PATCH 80/85] undo the last 6 merges i fucked up --- app.vue | 2 +- components/Button.vue | 2 +- components/Channel.vue | 6 +- components/Message.vue | 6 +- components/MessageArea.vue | 144 +++++++++++++----- layouts/client.vue | 116 +++++++------- pages/index.vue | 15 +- .../[serverId]/channels/[channelId].vue | 26 ++-- pages/settings.vue | 16 +- public/themes/ash.css | 1 + public/themes/dark.css | 1 + public/themes/description.css | 29 ++++ public/themes/light.css | 1 + public/themes/rainbow-capitalism.css | 6 +- 14 files changed, 251 insertions(+), 120 deletions(-) create mode 100644 public/themes/description.css diff --git a/app.vue b/app.vue index 7af306b..cb5ec34 100644 --- a/app.vue +++ b/app.vue @@ -33,7 +33,7 @@ body { font-family: Arial, Helvetica, sans-serif; box-sizing: border-box; color: var(--text-color); - background: var(--optional-chat-background); + background: var(--optional-body-background); background-color: var(--chat-background-color); margin: 0; } diff --git a/components/Button.vue b/components/Button.vue index fb44cf2..66706de 100644 --- a/components/Button.vue +++ b/components/Button.vue @@ -21,7 +21,7 @@ const props = defineProps<{ background-color: var(--primary-color); color: var(--text-color); - padding: 0.7dvh 1.2dvw; + padding: 0.4em 0.75em; font-size: 1.1em; transition: background-color 0.2s; diff --git a/components/Channel.vue b/components/Channel.vue index 0f48323..98f210e 100644 --- a/components/Channel.vue +++ b/components/Channel.vue @@ -23,14 +23,14 @@ const isCurrentChannel = props.uuid == props.currentUuid; .channel-list-link { text-decoration: none; color: inherit; - padding-left: .5dvw; - padding-right: .5dvw; + padding-left: .25em; + padding-right: .25em; } .channel-list-link-container { text-align: left; display: flex; - height: 4dvh; + height: 1.5em; white-space: nowrap; align-items: center; } diff --git a/components/Message.vue b/components/Message.vue index dce8ed4..eb073ac 100644 --- a/components/Message.vue +++ b/components/Message.vue @@ -188,12 +188,12 @@ function getDayDifference(date1: Date, date2: Date) { diff --git a/components/MessageArea.vue b/components/MessageArea.vue index 18b9ac5..fff4a5c 100644 --- a/components/MessageArea.vue +++ b/components/MessageArea.vue @@ -9,11 +9,28 @@
- - +
+ + + +
+ +
+
+
+
+ +
+ + + + +
@@ -106,11 +123,38 @@ function pushMessage(message: MessageResponse) { messages.value.push(message); } +function handleTextboxKeyDown(event: KeyboardEvent) { + if (event.key === "Enter" && event.shiftKey && messageTextboxInput.value) { + // this enters a newline, due to not preventing default + } else if (event.key === "Enter") { + event.preventDefault() + sendMessage(event) + } + + adjustTextboxHeight() +} + +function handleTextboxInput() { + if (messageTextboxInput.value) { + messageInput.value = messageTextboxInput.value.innerText; + } + + adjustTextboxHeight() +} + +// this technically uses pixel units, but it's still set using dynamic units +function adjustTextboxHeight() { + if (messageTextboxInput.value && messageTextboxDisplay.value) { + messageTextboxInput.value.style.height = "auto" + messageTextboxInput.value.style.height = `${messageTextboxInput.value.scrollHeight}px` + } +} + const messages = ref([]); - -const messageInput = ref(); - +const messageInput = ref(""); const messagesElement = ref(); +const messageTextboxInput = ref(); +const messageTextboxDisplay = ref(); if (messagesRes) messages.value = messagesRes; @@ -158,14 +202,21 @@ if (accessToken && apiBase) { function sendMessage(e: Event) { e.preventDefault(); - const message = { - message: messageInput.value - } - console.log("message:", message); - if (message.message) { + if (messageInput.value && messageInput.value.trim() !== "") { + const message = { + message: messageInput.value.trim().replace(/\n/g, "
") // trim, and replace \n with
+ } + + console.log("message:", message); ws.send(JSON.stringify(message)); - messageInput.value = ""; - console.log("MESSAGE SENT!!!"); + + // reset input field + messageInput.value = "" + if (messageTextboxInput.value) { + messageTextboxInput.value.innerText = "" + } + + adjustTextboxHeight() } } @@ -241,38 +292,63 @@ router.beforeEach((to, from, next) => { \ No newline at end of file diff --git a/pages/index.vue b/pages/index.vue index f970926..41deadf 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1,6 +1,19 @@ diff --git a/pages/servers/[serverId]/channels/[channelId].vue b/pages/servers/[serverId]/channels/[channelId].vue index 6bdcc7c..5c55655 100644 --- a/pages/servers/[serverId]/channels/[channelId].vue +++ b/pages/servers/[serverId]/channels/[channelId].vue @@ -83,36 +83,36 @@ function handleMemberClick(member: GuildMemberResponse) { \ No newline at end of file From 2790772cb7c1fd9a73a3f6df766a9e9be7ff0906 Mon Sep 17 00:00:00 2001 From: JustTemmie <47639983+JustTemmie@users.noreply.github.com> Date: Thu, 10 Jul 2025 16:32:41 +0200 Subject: [PATCH 82/85] fix: some of the worst merging i've done in my life --- layouts/client.vue | 47 +--------------------------------------------- 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/layouts/client.vue b/layouts/client.vue index bd3921a..a28d6bc 100644 --- a/layouts/client.vue +++ b/layouts/client.vue @@ -25,23 +25,6 @@
-
-
- - - -
- - - - -
- - - -
- -
@@ -69,11 +52,9 @@ const guilds: GuildResponse[] | undefined = await fetchWithApi("/me/guilds"); .visible { opacity: 100%; transition: opacity 500ms; - transition: opacity 500ms; } #homebar { - min-height: 4dvh; min-height: 4dvh; display: flex; justify-content: space-evenly; @@ -81,14 +62,8 @@ const guilds: GuildResponse[] | undefined = await fetchWithApi("/me/guilds"); background: var(--optional-topbar-background); background-color: var(--topbar-background-color); border-bottom: 1px solid var(--padding-color); - border-bottom: 1px solid var(--padding-color); padding-left: 5dvw; padding-right: 5dvw; - -} - -.homebar-item { - width: 100dvw; } .homebar-item { @@ -100,9 +75,6 @@ const guilds: GuildResponse[] | undefined = await fetchWithApi("/me/guilds"); flex-direction: row; flex-grow: 1; overflow: auto; - flex-direction: row; - flex-grow: 1; - overflow: auto; } #left-column { @@ -111,13 +83,10 @@ const guilds: GuildResponse[] | undefined = await fetchWithApi("/me/guilds"); gap: .75em; padding-left: .25em; padding-right: .25em; - gap: .75em; - padding-left: .25em; - padding-right: .25em; + padding-top: .5em; border-right: 1px solid var(--padding-color); background: var(--optional-sidebar-background); background-color: var(--sidebar-background-color); - padding-top: .5em; } #servers-list { @@ -128,16 +97,7 @@ const guilds: GuildResponse[] | undefined = await fetchWithApi("/me/guilds"); padding-top: .5em; } -#servers-list { - display: flex; - flex-direction: column; - gap: 1em; - width: 3.2rem; -} - #middle-left-column { - padding-left: .25em; - padding-right: .25em; padding-left: .25em; padding-right: .25em; border-right: 1px solid var(--padding-color); @@ -154,11 +114,6 @@ const guilds: GuildResponse[] | undefined = await fetchWithApi("/me/guilds"); overflow-x: hidden; } -.sidebar-icon { - width: 3rem; - height: 3rem; -} - #home-button { border-bottom: 1px solid var(--padding-color); padding-bottom: .375em; From f59162bad596ac953d0eeba91529b3952f4eb2a8 Mon Sep 17 00:00:00 2001 From: JustTemmie <47639983+JustTemmie@users.noreply.github.com> Date: Thu, 10 Jul 2025 20:13:25 +0200 Subject: [PATCH 83/85] fix: width of icon and channel lists --- layouts/client.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/client.vue b/layouts/client.vue index a28d6bc..966e60a 100644 --- a/layouts/client.vue +++ b/layouts/client.vue @@ -102,6 +102,7 @@ const guilds: GuildResponse[] | undefined = await fetchWithApi("/me/guilds"); padding-right: .25em; border-right: 1px solid var(--padding-color); min-width: 13em; + max-width: 13em; overflow-y: scroll; overflow-x: hidden; } @@ -109,7 +110,6 @@ const guilds: GuildResponse[] | undefined = await fetchWithApi("/me/guilds"); .sidebar-icon { width: 3rem; height: 3rem; - min-width: 10em; overflow-y: scroll; overflow-x: hidden; } From 04358e9c917c00b95b7debd51b7f476e2a79472c Mon Sep 17 00:00:00 2001 From: JustTemmie <47639983+JustTemmie@users.noreply.github.com> Date: Thu, 10 Jul 2025 21:04:27 +0200 Subject: [PATCH 84/85] feat: make settings menu remember your page on reload --- pages/settings.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/settings.vue b/pages/settings.vue index 3aac506..6bf3c9e 100644 --- a/pages/settings.vue +++ b/pages/settings.vue @@ -98,6 +98,7 @@ let currentPage = ref(categories[0].pages[0]); let selectedPage = ref(currentPage.value.displayName); // used to highlight the current channel function selectCategory(page: Page) { + window.location.hash = page.displayName.toLowerCase() currentPage.value = page; selectedPage.value = page.displayName; }; From 71242d0543ace0b581e01cf09ab8a44d33b882d3 Mon Sep 17 00:00:00 2001 From: justtemmie Date: Thu, 10 Jul 2025 19:37:04 +0000 Subject: [PATCH 85/85] revert 04358e9c917c00b95b7debd51b7f476e2a79472c revert feat: make settings menu remember your page on reload it breaks the back button, my bad --- pages/settings.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/pages/settings.vue b/pages/settings.vue index 6bf3c9e..3aac506 100644 --- a/pages/settings.vue +++ b/pages/settings.vue @@ -98,7 +98,6 @@ let currentPage = ref(categories[0].pages[0]); let selectedPage = ref(currentPage.value.displayName); // used to highlight the current channel function selectCategory(page: Page) { - window.location.hash = page.displayName.toLowerCase() currentPage.value = page; selectedPage.value = page.displayName; };