From 8102412ef2990941269c07d94ddde16295753cb7 Mon Sep 17 00:00:00 2001 From: Radiicall Date: Mon, 23 Jun 2025 21:46:55 +0200 Subject: [PATCH 01/40] chore: commit to make the CI work the CI server was down during the last commit --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b86a3a8..98ab3a8 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more. + ## Setup Make sure to install dependencies: From cca2c5ffd91674afe2f3bc85066f50b0d2e15501 Mon Sep 17 00:00:00 2001 From: Radiicall Date: Mon, 23 Jun 2025 21:50:40 +0200 Subject: [PATCH 02/40] chore: CI thingy --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 98ab3a8..ecdb2d5 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ # Nuxt Minimal Starter -Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more. +Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more. + ## Setup Make sure to install dependencies: 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 03/40] 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 32/40] 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 33/40] 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 35/40] 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 36/40] 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 37/40] 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 @@