-
STYLES
-
-
-
-
-
-
- {{ style.displayName }}
-
-
+
+
+
+ {{ theme.displayName }}
-
-
-
LAYOUTS
-
-
-
-
-
-
- {{ layout.displayName }}
-
-
-
![]()
-
-
-
+
@@ -57,120 +32,39 @@
\ No newline at end of file
diff --git a/components/UserInterface/ContextMenu.vue b/components/UserInterface/ContextMenu.vue
index 1767657..dac6efc 100644
--- a/components/UserInterface/ContextMenu.vue
+++ b/components/UserInterface/ContextMenu.vue
@@ -50,7 +50,7 @@ function runCallback(item: ContextMenuItem) {
height: 2rem;
width: 100%;
color: var(--text-color);
- background-color: var(--popup-background-color);
+ background-color: var(--sidebar-highlighted-background-color);
border: none;
text-align: left;
padding-left: 1rem;
@@ -58,7 +58,7 @@ function runCallback(item: ContextMenuItem) {
}
.context-menu-item:hover {
- background-color: var(--popup-highlighted-background-color);
+ background-color: rgb(50, 50, 50);
}
.context-menu-item-danger {
diff --git a/components/UserInterface/MessageReply.vue b/components/UserInterface/MessageReply.vue
index f3214b5..c3efd2b 100644
--- a/components/UserInterface/MessageReply.vue
+++ b/components/UserInterface/MessageReply.vue
@@ -58,7 +58,7 @@ function scrollToReply(e: MouseEvent) {
console.log("scrolling into view");
reply.scrollIntoView({ behavior: "smooth", block: "center" });
reply.style.transition = "background-color .3s";
- reply.style.backgroundColor = "var(--chat-featured-message-color)";
+ reply.style.backgroundColor = "var(--primary-highlighted-color)";
setTimeout(() => {
reply.style.backgroundColor = "";
}, 1000);
diff --git a/components/UserInterface/ResizableSidebar.vue b/components/UserInterface/ResizableSidebar.vue
index 79e95bd..27b0730 100644
--- a/components/UserInterface/ResizableSidebar.vue
+++ b/components/UserInterface/ResizableSidebar.vue
@@ -34,7 +34,7 @@ const storedWidth = ref
();
const contextMenu = useState("contextMenu");
const menuItems: ContextMenuItem[] = [
- { name: "Reset", type: "normal", callback: () => {
+ { name: "Reset", callback: () => {
const defaultWidth = props.width ?? props.minWidth;
resizableSidebar.value!.style.width = defaultWidth;
if (props.localStorageName) {
diff --git a/nuxt.config.ts b/nuxt.config.ts
index 05a40fa..46890d1 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", "rainbow-capitalism"
+ ]
}
},
/* nitro: {
diff --git a/pages/servers/[serverId]/channels/[channelId].vue b/pages/servers/[serverId]/channels/[channelId].vue
index f07dabd..b2e0782 100644
--- a/pages/servers/[serverId]/channels/[channelId].vue
+++ b/pages/servers/[serverId]/channels/[channelId].vue
@@ -24,7 +24,8 @@
border-sides="left" local-storage-name="membersListWidth">
@@ -49,6 +50,7 @@ const channels = ref();
const channel = ref();
const members = ref();
+const totalMemberCount = ref(0);
const showInvitePopup = ref(false);
const showGuildSettings = ref(false);
@@ -65,6 +67,16 @@ onMounted(async () => {
console.log("fetched guild");
await setArrayVariables();
console.log("set array variables");
+ const membersList = document.getElementById("members-list");
+ if (membersList) {
+ membersList.addEventListener("scroll", (e) => {
+ if (e.target && e.target instanceof Element) {
+ if (isVisible(e.target)) {
+
+ }
+ }
+ });
+ }
});
onActivated(async () => {
@@ -79,6 +91,8 @@ onActivated(async () => {
async function setArrayVariables() {
const membersRes = await fetchMembers(route.params.serverId as string);
members.value = membersRes.objects;
+ totalMemberCount.value = (membersRes.amount * membersRes.pages) - membersRes.amount;
+ console.log("Placeholder count:", totalMemberCount.value);
const guildUrl = `guilds/${route.params.serverId}`;
channels.value = await fetchWithApi(`${guildUrl}/channels`);
console.log("channels:", channels.value);
@@ -98,6 +112,20 @@ function toggleInvitePopup(e: Event) {
function handleMemberClick(member: GuildMemberResponse) {
}
+
+function isVisible(element: Element) {
+ const rect = element.getBoundingClientRect();
+ return (
+ rect.top >= 0 &&
+ rect.left >= 0 &&
+ rect.bottom <= (
+ window.innerHeight ||
+ document.documentElement.clientHeight) &&
+ rect.right <= (
+ window.innerWidth ||
+ document.documentElement.clientWidth)
+ );
+}