From a56e12149bc4ef0cc1082ee75b0546116f4c5872 Mon Sep 17 00:00:00 2001
From: JustTemmie <47639983+JustTemmie@users.noreply.github.com>
Date: Tue, 3 Jun 2025 06:15:51 +0200
Subject: [PATCH 01/57] fix: modify message css to avoid weird line spacing
---
components/Message.vue | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/components/Message.vue b/components/Message.vue
index 64af1d9..5db6ec3 100644
--- a/components/Message.vue
+++ b/components/Message.vue
@@ -19,7 +19,7 @@
+
-
@@ -100,8 +100,7 @@ onMounted(async () => {
.message {
text-align: left;
/* border: 1px solid lightcoral; */
- display: grid;
- grid-template-columns: 1fr 19fr;
+ display: contents;
align-items: center;
}
@@ -110,7 +109,7 @@ onMounted(async () => {
}
#last-message {
- margin-bottom: 2dvh;
+ margin-bottom: 1dvh;
}
.message-metadata {
@@ -143,6 +142,7 @@ onMounted(async () => {
min-width: 4dvw;
text-align: center;
align-content: center;
+ white-space: nowrap;
}
.author-username {
diff --git a/components/MessageArea.vue b/components/MessageArea.vue
index e3dcdbf..e142641 100644
--- a/components/MessageArea.vue
+++ b/components/MessageArea.vue
@@ -245,8 +245,8 @@ onMounted(async () => {
#messages {
overflow-y: scroll;
- display: flex;
- flex-direction: column;
+ display: grid;
+ grid-template-columns: min-content 1fr;
gap: 1dvh;
padding-left: 1dvw;
padding-right: 1dvw;
From d986f601dec7466d9a81974c9336c31e0e64a238 Mon Sep 17 00:00:00 2001
From: SauceyRed
Date: Tue, 3 Jun 2025 20:42:34 +0200
Subject: [PATCH 03/57] feat: improve 24-hour to 12-hour format conversion by
using Date methods
---
components/Message.vue | 24 +++---------------------
1 file changed, 3 insertions(+), 21 deletions(-)
diff --git a/components/Message.vue b/components/Message.vue
index e488adc..61f1c10 100644
--- a/components/Message.vue
+++ b/components/Message.vue
@@ -10,7 +10,7 @@
{{ username }}
- {{ messageDate }}
+ {{ date.toLocaleTimeString(undefined, { timeStyle: "short" }) }}
@@ -20,7 +20,7 @@
- {{ messageDate }}
+ {{ date.toLocaleTimeString(undefined, { timeStyle: "short" }) }}
@@ -46,32 +46,14 @@ const props = defineProps<{
last: boolean
}>();
-const messageDate = ref
();
-
const messageElement = ref();
const dateHidden = ref(true);
const date = new Date(props.timestamp);
-let dateHour = date.getHours();
-let dateMinute = date.getMinutes();
-if (props.format == "12") {
- if (dateHour > 12) {
- dateHour = dateHour - 12;
- messageDate.value = `${dateHour}:${dateMinute < 10 ? "0" + dateMinute : dateMinute} PM`
- } else {
- if (dateHour == 0) {
- dateHour = 12;
- }
- messageDate.value = `${dateHour}:${dateMinute < 10 ? "0" + dateMinute : dateMinute} ${dateHour >= 0 && dateHour < 13 ? "AM" : "PM"}`
- }
-} else {
- messageDate.value = `${dateHour}:${dateMinute < 10 ? "0" + dateMinute : dateMinute}`
-}
-
console.log("message:", props.text);
-console.log("author:", props.username);
+console.log("author:", props.username)
const sanitized = ref();
From 82fde5671dc68a9f9bd47292ae6991d5ef377c3e Mon Sep 17 00:00:00 2001
From: SauceyRed
Date: Tue, 3 Jun 2025 20:49:41 +0200
Subject: [PATCH 04/57] fix: last message from user not having bottom margin
---
components/Message.vue | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/components/Message.vue b/components/Message.vue
index 61f1c10..1912854 100644
--- a/components/Message.vue
+++ b/components/Message.vue
@@ -1,5 +1,5 @@
-
+
@@ -16,7 +16,7 @@
-
+
@@ -86,6 +86,10 @@ onMounted(async () => {
align-items: center;
}
+.message-margin-bottom > * {
+ margin-bottom: 1dvh;
+}
+
.normal-message {
margin-top: 1dvh;
}
@@ -121,7 +125,6 @@ onMounted(async () => {
}
.left-column {
- min-width: 4dvw;
text-align: center;
align-content: center;
white-space: nowrap;
From 263c823ceb920592a64c6d6b6bd0daa93adb2cca Mon Sep 17 00:00:00 2001
From: SauceyRed
Date: Tue, 3 Jun 2025 20:50:28 +0200
Subject: [PATCH 05/57] fix: tabIndex not working after changing messages to
use "display: contents;"
---
components/Message.vue | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/components/Message.vue b/components/Message.vue
index 1912854..66cf1b5 100644
--- a/components/Message.vue
+++ b/components/Message.vue
@@ -1,19 +1,19 @@
-
![]()
+
-
+
{{ username }}
{{ date.toLocaleTimeString(undefined, { timeStyle: "short" }) }}
-
+
@@ -25,7 +25,7 @@
From 67e10a4387f6838548d0de95b3a56c8701da4277 Mon Sep 17 00:00:00 2001
From: SauceyRed
Date: Tue, 3 Jun 2025 20:52:42 +0200
Subject: [PATCH 06/57] feat: refactor to allow more markdown tags, syling
changes to make lists and headings not take up as much space
---
components/Message.vue | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/components/Message.vue b/components/Message.vue
index 66cf1b5..8df20cd 100644
--- a/components/Message.vue
+++ b/components/Message.vue
@@ -32,7 +32,7 @@
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 @@
+
+
+ HELLO!!
+
+
+
+
+
+
\ 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 @@
@@ -133,7 +133,7 @@ async function changeAvatar() {
background-color: var(--accent-color);
}
-.profile-popup {
+#profile-popup {
margin-left: 2dvw;
}
\ No newline at end of file
From 3c4965c06f96ee215834dc2ea1fb14f0037d600d Mon Sep 17 00:00:00 2001
From: JustTemmie <47639983+JustTemmie@users.noreply.github.com>
Date: Fri, 4 Jul 2025 08:04:50 +0200
Subject: [PATCH 36/57] feat: start implementing image cropping when uploading
pfp
still need to fix the selection to within the canvas boundries, and fix theming
---
components/CropPopup.vue | 61 ++++++++++
components/Settings/UserSettings/Profile.vue | 37 ++++++-
package.json | 1 +
pnpm-lock.yaml | 110 +++++++++++++++++++
4 files changed, 208 insertions(+), 1 deletion(-)
create mode 100644 components/CropPopup.vue
diff --git a/components/CropPopup.vue b/components/CropPopup.vue
new file mode 100644
index 0000000..2e1a6b1
--- /dev/null
+++ b/components/CropPopup.vue
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
diff --git a/components/Settings/UserSettings/Profile.vue b/components/Settings/UserSettings/Profile.vue
index f1a550b..1df8c44 100644
--- a/components/Settings/UserSettings/Profile.vue
+++ b/components/Settings/UserSettings/Profile.vue
@@ -21,12 +21,23 @@
+
+
+
+
+
@@ -101,8 +100,6 @@ async function changeAvatar() {
const file = input.files[0];
if (!file) return;
- newPfpFile = file
-
const reader = new FileReader();
reader.addEventListener("load", () => {
if (reader.result && typeof reader.result === 'string') {
@@ -171,4 +168,21 @@ function closeCropPopup() {
#profile-popup {
margin-left: 2dvw;
}
+
+#crop-popup-container {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 10;
+ background: rgba(0,0,0,0.5);
+}
+
+#crop-popup-preview {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+}
\ No newline at end of file
From 181fcd04dbdc1a3bb66557a88c071a908582404b Mon Sep 17 00:00:00 2001
From: JustTemmie <47639983+JustTemmie@users.noreply.github.com>
Date: Fri, 4 Jul 2025 09:27:51 +0200
Subject: [PATCH 38/57] feat: ensure there's a background colour for the user
popup's avatar
---
components/UserPopup.vue | 2 ++
1 file changed, 2 insertions(+)
diff --git a/components/UserPopup.vue b/components/UserPopup.vue
index 3a65cf0..a3a15cb 100644
--- a/components/UserPopup.vue
+++ b/components/UserPopup.vue
@@ -59,12 +59,14 @@ const props = defineProps<{
width: 96px;
height: 96px;
border: 5px solid #4b3018;
+ background-color: var(--secondary-color);
border-radius: 100%;
position: absolute;
left: 16px;
top: 16px;
}
+
#display-name {
margin-top: 60px;
margin-bottom: 0;
From d9c6faa6ab4a2aad29189a03e855e0461c9eb969 Mon Sep 17 00:00:00 2001
From: JustTemmie <47639983+JustTemmie@users.noreply.github.com>
Date: Fri, 4 Jul 2025 09:43:05 +0200
Subject: [PATCH 39/57] refactor: move stuff from profile to within the crop
popup itself
---
components/CropPopup.vue | 32 ++++++++++++++------
components/Settings/UserSettings/Profile.vue | 31 ++++---------------
2 files changed, 29 insertions(+), 34 deletions(-)
diff --git a/components/CropPopup.vue b/components/CropPopup.vue
index 7671e4d..8321cb1 100644
--- a/components/CropPopup.vue
+++ b/components/CropPopup.vue
@@ -1,8 +1,10 @@
-
-
+
-
+
{{ 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 53/57] 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 54/57] 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 @@