Compare commits

...

11 commits

Author SHA1 Message Date
825cf2ba52
fix: minor changes to fix review
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
ci/woodpecker/pr/build-and-publish Pipeline was successful
ci/woodpecker/pull_request_closed/build-and-publish Pipeline was successful
2025-07-05 19:32:14 +02:00
def96c4df3
Merge branch 'main' into pfp-cropping 2025-07-05 19:30:08 +02:00
9f1232a668
fix: ensure memberlist isn't taller than the screen
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
i'm not sure why you need to set a max height, this isn't really a great soulution to the problem either, but we need *something* right now
2025-07-05 15:38:00 +02:00
59a2855a1d Merge pull request 'fix build time and version hash being evaluated at runtime' (#17) from settings-metadata into main
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
Reviewed-on: #17
2025-07-05 13:26:20 +00:00
c1021b1192
fix: fix build time and version hash being evaluated at runtime
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
ci/woodpecker/pr/build-and-publish Pipeline was successful
ci/woodpecker/pull_request_closed/build-and-publish Pipeline was successful
2025-07-05 15:24:09 +02:00
aa335b086a
feat: use logout endpoint for logout and move old logic to revoke in auth
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
2025-07-05 02:38:23 +02:00
87f4ecc9dc Merge pull request 'feat: add links, build time, and git hash to settings menu' (#13) from settings-metadata into main
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
Reviewed-on: #13
Reviewed-by: SauceyRed <saucey@saucey.red>
2025-07-04 23:40:23 +00:00
c0df384d7b Merge branch 'main' into settings-metadata
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
ci/woodpecker/pr/build-and-publish Pipeline was successful
ci/woodpecker/pull_request_closed/build-and-publish Pipeline was successful
2025-07-04 23:39:54 +00:00
059282706b
fix: remove random accidental import, fix build system
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
ci/woodpecker/pr/build-and-publish Pipeline was successful
2025-07-05 01:27:04 +02:00
0f11e4e545
feat: update message sending to use JSON to match backend change
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
2025-07-05 01:10:36 +02:00
c8b7c1d909
feat: add links, build time, and git hash to settings menu
Some checks failed
ci/woodpecker/push/build-and-publish Pipeline failed
ci/woodpecker/pr/build-and-publish Pipeline failed
2025-07-04 13:05:09 +02:00
7 changed files with 58 additions and 30 deletions

View file

@ -1,15 +1,14 @@
<template>
<div id="fullscreen-container">
<div id="crop-preview">
<img ref="image" :src="imageSrc" style="min-height: 500px;">
<Button class="button" text="Crop" :callback="cropImage"></Button>
<Button class="button" text="Cancel" :callback="closePopup"></Button>
<img ref="image" :src="imageSrc" style="min-height: 35dvh;">
<Button text="Crop" :callback="cropImage"></Button>
<Button text="Cancel" :callback="closePopup"></Button>
</div>
</div>
</template>
<script lang="ts" setup>
import { ref, watch } from 'vue';
import Cropper from 'cropperjs';
const props = defineProps({
@ -82,7 +81,7 @@ function closePopup() {
width: 100%;
height: 100%;
z-index: 10;
background: rgba(0,0,0,0.5);
background: rgba(0, 0, 0, 0.5);
}
#crop-preview {

View file

@ -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!!!");
}

View file

@ -33,22 +33,19 @@
</template>
<script lang="ts" setup>
import Button from '~/components/Button.vue';
import CropPopup from '~/components/CropPopup.vue';
import type { UserResponse } from '~/types/interfaces';
let newPfpFile: File;
const isCropPopupVisible = ref(false);
const cropImageSrc = ref("")
;
const { fetchUser } = useAuth();
const user: UserResponse | undefined = await fetchUser()
if (!user) {
alert("could not fetch user info, aborting :(")
}
let newPfpFile: File;
const isCropPopupVisible = ref(false);
const cropImageSrc = ref('');
async function saveChanges() {
if (!user) return;

View file

@ -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", {

View file

@ -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: {

View file

@ -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;

View file

@ -2,8 +2,8 @@
<div id="settings-page-container">
<div id="settings-page">
<div id="sidebar">
<h4>(Search bar here)</h4>
<ul>
<!-- categories and dynamic settings pages -->
<div v-for="category in categories" :key="category.displayName">
<h2>{{ category.displayName }}</h2>
<li v-for="page in category.pages" :key="page.displayName" @click="selectCategory(page)"
@ -12,8 +12,23 @@
</li>
<span class="spacer"></span>
</div>
<p>
<Button text="Log Out" :callback=logout variant="scary"></Button>
</p>
<span class="spacer"></span>
<p id="links-and-socials">
<NuxtLink href="https://git.gorb.app/gorb/frontend" title="Source"><Icon name="lucide:git-branch-plus" /></NuxtLink>
<NuxtLink href="https://docs.gorb.app" title="Backend Documentation"><Icon name="lucide:book-open-text" /></NuxtLink>
</p>
<p style="font-size: .8em; color: var(--secondary-text-color)">
Version Hash: {{ appConfig.public.gitHash }}
<br>
Build Time: {{ appConfig.public.buildTimeString }}
</p>
<Button text="Log Out" :callback=logout variant="scary"></Button>
</ul>
</div>
<div id="sub-page">
@ -29,6 +44,8 @@ import Button from '~/components/Button.vue';
const { logout } = useAuth()
const appConfig = useRuntimeConfig()
interface Page {
displayName: string;
pageData: any; // is actually Component but TS is yelling at me :(
@ -103,7 +120,7 @@ function selectCategory(page: Page) {
background-color: var(--sidebar-background-color);
color: var(--text-color);
padding: 1dvh 1dvw;
margin-left: auto;
margin-left: 0;
overflow-y: auto;
height: 100vh;
@ -128,6 +145,10 @@ function selectCategory(page: Page) {
transition: background-color 0.3s;
}
#sidebar p {
margin: 2dvh 0.8dvw;
}
.sidebar-focus {
background-color: var(--sidebar-highlighted-background-color);
}
@ -147,11 +168,15 @@ function selectCategory(page: Page) {
height: 100vh;
}
#links-and-socials * {
margin-right: 0.2em;
}
.spacer {
height: 0.2dvh;
display: block;
margin: 0.8dvh 1dvw;
background-color: var(--spacing-color);
background-color: var(--padding-color);
}
/* applies to child pages too */