Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
a379dcb
feat: add some initial idea for a search overhaul
HJyup May 20, 2026
a7fe16d
feat: changes (more cute things)
HJyup May 21, 2026
fd4d18d
fix: remove unused components
HJyup May 21, 2026
c59ba3f
fix: change colours for surfaces
HJyup May 21, 2026
5bacdec
feat: unify filters for search page
HJyup May 21, 2026
7db9cb4
feat: add skeletons for a search page and add debounce for a search s…
HJyup May 21, 2026
d3ab43a
feat: add some initial responsiveness
HJyup May 21, 2026
5086159
feat: update READMEs
HJyup May 21, 2026
51dc8b9
feat: update Error state
HJyup May 22, 2026
076e775
fix: clean components
HJyup May 22, 2026
9ebf15e
feat: add me page and some skeletons
HJyup May 22, 2026
d69e621
fix: move images
HJyup May 22, 2026
024d200
refactor: components
HJyup May 22, 2026
2ff780b
fix: lint
HJyup May 22, 2026
5df2067
fix: update deps
HJyup May 23, 2026
d29316c
Potential fix for pull request finding
HJyup May 23, 2026
bd8e2ff
Potential fix for pull request finding
HJyup May 23, 2026
bdd4357
refactor: unify filters and my events
HJyup May 23, 2026
9bfa60f
fix: calendar
HJyup May 23, 2026
93612c6
Merge remote-tracking branch 'origin/feat/project-cutie' into feat/pr…
HJyup May 23, 2026
cd2dc57
feat: TARDIS to Tardis
HJyup May 23, 2026
652642c
fix: make spinner better
HJyup May 23, 2026
00ad355
fix: make auth sync with react query
HJyup May 23, 2026
6e2c5ab
feat: redesign registration button
HJyup May 23, 2026
2235e37
feat: make api more robust
HJyup May 23, 2026
8793306
fix: move onClose handler from div to a/Link in mobile menu renderItem
Copilot May 23, 2026
9827f43
fix(web): sanitize api client error logging
Copilot May 23, 2026
2fcd2b9
Changes before error encountered
Copilot May 23, 2026
f2bc697
Changes before error encountered
Copilot May 23, 2026
19cf189
fix: fix styles and create form https
HJyup May 23, 2026
7639688
Merge remote-tracking branch 'origin/feat/project-cutie' into feat/pr…
HJyup May 23, 2026
3cb87b6
fix: update docker file
HJyup May 23, 2026
79377b6
feat: add archive for past events
HJyup May 23, 2026
ee2f043
refactor: remove unused filters
HJyup May 23, 2026
1644a3a
fix: remove unused tests for not existing filter
HJyup May 23, 2026
23aa9a7
fix: update Dicord URL
HJyup May 23, 2026
10dc018
fix: remove several ids unifying them and fix schemas. Additionally, …
HJyup May 25, 2026
f1ae9a1
fix: pnpm override?
HJyup May 25, 2026
3d521e3
fix: fix
HJyup May 25, 2026
8d55327
Potential fix for pull request finding
HJyup May 27, 2026
da6544c
fix: fix
HJyup May 29, 2026
682007e
Merge remote-tracking branch 'origin/feat/project-cutie' into feat/pr…
HJyup May 29, 2026
939dcd5
fix: fix
HJyup May 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions apps/api/src/modules/events/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,24 @@ export const EventsQueryFilterSchema = QueryFilterSchema.extend({
.enum(["true", "false"])
.optional()
.transform((val) => val === "true"),
search: z
.string()
.trim()
.min(1)
.max(200)
.optional(),
sigs: z
.string()
.optional()
.transform((val) =>
val
? val
.split(",")
.map((s) => s.trim())
.filter(Boolean)
: undefined,
),
date: z.iso.date().optional(),
});

export type EventId = z.infer<typeof EventIdSchema>;
Expand Down
18 changes: 15 additions & 3 deletions apps/api/src/modules/events/store.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { eq, gte, and, SQL } from "drizzle-orm";
import { eq, gte, lt, and, ilike, inArray, SQL } from "drizzle-orm";
import { SqlContext } from "../../db/db.js";
import { CreateEvent, EventId, EventsQueryFilter, UpdateEvent } from "./schema.js";
import { eventsTable, registrationsTable } from "../../db/schema.js";
Expand Down Expand Up @@ -35,15 +35,27 @@ export const eventStore = {
},

async get({ db, filters }: { db: SqlContext; filters: EventsQueryFilter }) {
const { page, limit, state, includePast } = filters;
const { page, limit, state, includePast, search, sigs, date } = filters;
const offset = (page - 1) * limit;

const today = new Date();
today.setUTCHours(0, 0, 0, 0);

let dayStart: Date | null = null;
let dayEnd: Date | null = null;
if (date) {
dayStart = new Date(`${date}T00:00:00.000Z`);
dayEnd = new Date(dayStart);
dayEnd.setUTCDate(dayEnd.getUTCDate() + 1);
}

const conditions = [
state ? eq(eventsTable.state, state) : null,
!includePast ? gte(eventsTable.date, today) : null,
!includePast && !date ? gte(eventsTable.date, today) : null,
search ? ilike(eventsTable.title, `%${search}%`) : null,
sigs && sigs.length > 0 ? inArray(eventsTable.organiser, sigs) : null,
dayStart ? gte(eventsTable.date, dayStart) : null,
dayEnd ? lt(eventsTable.date, dayEnd) : null,
].filter((condition): condition is SQL => condition !== null);
Comment thread
HJyup marked this conversation as resolved.

return db
Expand Down
Binary file added apps/web/public/mascot-discord.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/web/public/no-events.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 32 additions & 22 deletions apps/web/src/components/event-card.tsx
Original file line number Diff line number Diff line change
@@ -1,43 +1,53 @@
import { Link } from '@tanstack/react-router'
import { ArrowUpRight, CalendarIcon, MapPin } from 'lucide-react'
import { MapPin, Users } from 'lucide-react'
import type { Event } from '@events.comp-soc.com/shared'
import { SigBadge } from '@/components/sigs-badge.tsx'
import { formatEventDate } from '@/lib/utils.ts'

interface EventCardProps {
event: Event
pinned?: boolean
}

function EventCard({ event }: EventCardProps) {
function EventCard({ event, pinned = false }: EventCardProps) {
const { full: date } = formatEventDate(event.date)

return (
<Link
to="/events/$eventId"
params={{ eventId: String(event.id) }}
className="block"
className="block group"
>
<div className="group relative bg-surface border border-neutral-800 hover:border-neutral-600 rounded-md p-4 sm:p-5 transition-all duration-200 hover:shadow-lg hover:bg-neutral-800/30 cursor-pointer">
<div className="flex justify-between items-start gap-2">
<div className="min-w-0 flex-1">
<div className="flex items-center gap-1.5 sm:gap-2 mb-2 flex-wrap">
<SigBadge sig={event.organiser} size="sm" />
<div
className={`relative overflow-hidden border rounded-md p-5 transition-shadow duration-150 cursor-pointer ring-2 ring-transparent group-hover:ring-primary group-hover:border-primary ${
pinned
? 'bg-card-hover border-neutral-600 shadow-[inset_0_1px_0_rgba(255,255,255,0.04)]'
: 'bg-card border-card-border'
}`}
>
<div className="flex flex-col gap-2">
<div className="text-xs text-neutral-500">{date}</div>

<h3 className="text-xl sm:text-2xl font-bold text-neutral-100 leading-tight wrap-break-word">
Comment thread
HJyup marked this conversation as resolved.
Outdated
{event.title}
</h3>

<div className="flex items-center gap-3 flex-wrap text-sm text-neutral-400 mt-1">
<div className="flex items-center gap-1.5 min-w-0">
<MapPin className="w-3.5 h-3.5 shrink-0 text-neutral-500" />
<span className="truncate">{event.location}</span>
</div>
<h3 className="text-base sm:text-lg font-bold text-neutral-100 group-hover:text-white mb-1 wrap-break-word">
{event.title}
</h3>
</div>
<ArrowUpRight className="w-4 h-4 sm:w-5 sm:h-5 text-neutral-600 group-hover:text-white transition-colors shrink-0" />
</div>

<div className="flex flex-col gap-1 sm:gap-1.5 mt-2 sm:mt-3 text-xs sm:text-sm text-neutral-400">
<div className="flex items-center gap-1.5 sm:gap-2">
<CalendarIcon className="w-3 h-3 sm:w-3.5 sm:h-3.5 shrink-0" />
<span className="truncate">{date}</span>
</div>
<div className="flex items-center gap-1.5 sm:gap-2">
<MapPin className="w-3 h-3 sm:w-3.5 sm:h-3.5 shrink-0" />
<span className="truncate">{event.location}</span>
{event.capacity != null && (
<div className="flex items-center gap-1.5 text-neutral-400">
<Users className="w-3.5 h-3.5 text-neutral-500" />
<span className="tabular-nums">{event.capacity}</span>
</div>
)}

<div className="ml-auto">
<SigBadge sig={event.organiser} size="sm" />
</div>
</div>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions apps/web/src/components/layout/auth-window.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ReactNode } from 'react'
import { WindowControls } from '@/components/layout/window/window-bar.tsx'
import { WindowControls } from '@/components/layout/window-bar.tsx'

interface AuthWindowProps {
children: ReactNode
Expand All @@ -10,8 +10,8 @@ export function AuthWindow({ children, title }: AuthWindowProps) {
return (
<div className="flex items-center justify-center min-h-[80vh] m-2">
<div className="w-full max-w-md animate-in fade-in slide-in-from-bottom-4 duration-500">
<div className="bg-window border border-neutral-800 rounded-lg shadow-2xl overflow-hidden">
<div className="flex items-center h-10 px-3 bg-window border-b border-neutral-800 relative">
<div className="bg-navigation border border-card-border rounded-lg shadow-2xl overflow-hidden">
<div className="flex items-center h-10 px-3 bg-navigation border-b border-card-border relative">
<WindowControls />
<div className="absolute left-1/2 -translate-x-1/2 text-xs font-bold text-neutral-400 tracking-wide">
{title}
Expand Down
Loading
Loading