Switch UI components to new design system tokens

Standardizes color values and styling using the new tokens:
- Replaces hardcoded colors with semantic variables
- Updates background/text/border classes for light/dark mode
- Migrates inputs to UInput/USelect/UTextarea components
- Removes redundant style declarations
This commit is contained in:
Jennie Robinson Faber 2025-10-13 15:05:29 +01:00
parent 9b45652b83
commit 3fea484585
13 changed files with 788 additions and 785 deletions

View file

@ -1,10 +1,10 @@
<template>
<div>
<div class="bg-white border-b">
<div class="bg-elevated border-b">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="py-6">
<h1 class="text-2xl font-bold text-gray-900">Event Management</h1>
<p class="text-gray-600">
<h1 class="text-2xl font-bold text-highlighted">Event Management</h1>
<p class="text-muted">
Create, manage, and monitor Ghost Guild events and workshops
</p>
</div>
@ -15,30 +15,32 @@
<!-- Search and Actions -->
<div class="mb-6 flex justify-between items-center">
<div class="flex gap-4 items-center">
<input
<UInput
v-model="searchQuery"
placeholder="Search events..."
class="border border-gray-300 rounded-lg px-4 py-2 w-80 focus:ring-2 focus:ring-blue-500 focus:border-transparent"
class="w-80"
/>
<select
<USelect
v-model="typeFilter"
class="border border-gray-300 rounded-lg px-4 py-2 focus:ring-2 focus:ring-blue-500 focus:border-transparent"
>
<option value="">All Types</option>
<option value="community">Community</option>
<option value="workshop">Workshop</option>
<option value="social">Social</option>
<option value="showcase">Showcase</option>
</select>
<select
:items="[
{ label: 'All Types', value: '' },
{ label: 'Community', value: 'community' },
{ label: 'Workshop', value: 'workshop' },
{ label: 'Social', value: 'social' },
{ label: 'Showcase', value: 'showcase' },
]"
class="w-full"
/>
<USelect
v-model="statusFilter"
class="border border-gray-300 rounded-lg px-4 py-2 focus:ring-2 focus:ring-blue-500 focus:border-transparent"
>
<option value="">All Status</option>
<option value="upcoming">Upcoming</option>
<option value="ongoing">Ongoing</option>
<option value="past">Past</option>
</select>
:items="[
{ label: 'All Status', value: '' },
{ label: 'Upcoming', value: 'upcoming' },
{ label: 'Ongoing', value: 'ongoing' },
{ label: 'Past', value: 'past' },
]"
class="w-full"
/>
</div>
<button
@click="showCreateModal = true"
@ -49,7 +51,7 @@
</div>
<!-- Events Table -->
<div class="bg-white rounded-lg shadow overflow-hidden">
<div class="bg-elevated rounded-lg shadow overflow-hidden">
<div v-if="pending" class="p-8 text-center">
<div class="inline-flex items-center">
<div
@ -64,51 +66,51 @@
</div>
<table v-else class="w-full">
<thead class="bg-gray-50">
<thead class="bg-muted">
<tr>
<th
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
class="px-6 py-3 text-left text-xs font-medium text-dimmed uppercase tracking-wider"
>
Title
</th>
<th
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
class="px-6 py-3 text-left text-xs font-medium text-dimmed uppercase tracking-wider"
>
Type
</th>
<th
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
class="px-6 py-3 text-left text-xs font-medium text-dimmed uppercase tracking-wider"
>
Start Date
</th>
<th
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
class="px-6 py-3 text-left text-xs font-medium text-dimmed uppercase tracking-wider"
>
Status
</th>
<th
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
class="px-6 py-3 text-left text-xs font-medium text-dimmed uppercase tracking-wider"
>
Registration
</th>
<th
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
class="px-6 py-3 text-left text-xs font-medium text-dimmed uppercase tracking-wider"
>
Actions
</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tbody class="bg-elevated divide-y divide-default">
<tr
v-for="event in filteredEvents"
:key="event._id"
class="hover:bg-gray-50"
class="hover:bg-muted"
>
<td class="px-6 py-4">
<div class="text-sm font-medium text-gray-900">
<div class="text-sm font-medium text-highlighted">
{{ event.title }}
</div>
<div class="text-sm text-gray-500">
<div class="text-sm text-dimmed">
{{ event.description.substring(0, 100) }}...
</div>
</td>
@ -120,7 +122,7 @@
{{ event.eventType }}
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-600">
<td class="px-6 py-4 whitespace-nowrap text-sm text-muted">
{{ formatDateTime(event.startDate) }}
</td>
<td class="px-6 py-4 whitespace-nowrap">
@ -136,24 +138,24 @@
:class="
event.registrationRequired
? 'bg-blue-100 text-blue-800'
: 'bg-gray-100 text-gray-800'
: 'bg-accented text-default'
"
class="inline-flex px-2 py-1 text-xs font-semibold rounded-full"
>
{{ event.registrationRequired ? "Required" : "Open" }}
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-600">
<td class="px-6 py-4 whitespace-nowrap text-sm text-default">
<div class="flex gap-2">
<button
@click="editEvent(event)"
class="text-primary-600 hover:text-primary-900"
class="text-primary hover:text-primary"
>
Edit
</button>
<button
@click="duplicateEvent(event)"
class="text-primary-600 hover:text-primary-900"
class="text-primary hover:text-primary"
>
Duplicate
</button>
@ -171,7 +173,7 @@
<div
v-if="!pending && !error && filteredEvents.length === 0"
class="p-8 text-center text-gray-500"
class="p-8 text-center text-dimmed"
>
No events found matching your criteria
</div>
@ -183,7 +185,7 @@
v-if="showCreateModal"
class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 overflow-y-auto"
>
<div class="bg-white rounded-lg shadow-xl max-w-2xl w-full mx-4 my-8">
<div class="bg-elevated rounded-lg shadow-xl max-w-2xl w-full mx-4 my-8">
<div class="px-6 py-4 border-b">
<h3 class="text-lg font-semibold">
{{ editingEvent ? "Edit Event" : "Create New Event" }}
@ -193,115 +195,116 @@
<form @submit.prevent="saveEvent" class="p-6 space-y-4">
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="md:col-span-2">
<label class="block text-sm font-medium text-gray-700 mb-1"
<label class="block text-sm font-medium text-default mb-1"
>Event Title</label
>
<input
<UInput
v-model="eventForm.title"
placeholder="Enter event title"
required
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-500 focus:border-transparent"
class="w-full"
/>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1"
<label class="block text-sm font-medium text-default mb-1"
>Event Type</label
>
<select
<USelect
v-model="eventForm.eventType"
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-500 focus:border-transparent"
>
<option value="community">Community Meetup</option>
<option value="workshop">Workshop</option>
<option value="social">Social Event</option>
<option value="showcase">Showcase</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1"
>Location</label
>
<input
v-model="eventForm.location"
placeholder="Event location"
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-500 focus:border-transparent"
:items="[
{ label: 'Community Meetup', value: 'community' },
{ label: 'Workshop', value: 'workshop' },
{ label: 'Social Event', value: 'social' },
{ label: 'Showcase', value: 'showcase' },
]"
class="w-full"
/>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1"
<label class="block text-sm font-medium text-default mb-1"
>Location</label
>
<UInput
v-model="eventForm.location"
placeholder="Event location"
class="w-full"
/>
</div>
<div>
<label class="block text-sm font-medium text-default mb-1"
>Start Date & Time</label
>
<input
<UInput
v-model="eventForm.startDate"
type="datetime-local"
required
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-500 focus:border-transparent"
class="w-full"
/>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1"
<label class="block text-sm font-medium text-default mb-1"
>End Date & Time</label
>
<input
<UInput
v-model="eventForm.endDate"
type="datetime-local"
required
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-500 focus:border-transparent"
class="w-full"
/>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1"
<label class="block text-sm font-medium text-default mb-1"
>Max Attendees</label
>
<input
<UInput
v-model="eventForm.maxAttendees"
type="number"
placeholder="Optional"
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-500 focus:border-transparent"
class="w-full"
/>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1"
<label class="block text-sm font-medium text-default mb-1"
>Registration Deadline</label
>
<input
<UInput
v-model="eventForm.registrationDeadline"
type="datetime-local"
placeholder="Optional"
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-500 focus:border-transparent"
class="w-full"
/>
</div>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1"
<label class="block text-sm font-medium text-default mb-1"
>Description</label
>
<textarea
<UTextarea
v-model="eventForm.description"
placeholder="Event description"
required
rows="3"
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-500 focus:border-transparent"
></textarea>
:rows="3"
class="w-full"
/>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1"
<label class="block text-sm font-medium text-default mb-1"
>Additional Content</label
>
<textarea
<UTextarea
v-model="eventForm.content"
placeholder="Detailed event information, agenda, etc."
rows="4"
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-500 focus:border-transparent"
></textarea>
:rows="4"
class="w-full"
/>
</div>
<div class="flex items-center gap-6">
@ -309,17 +312,17 @@
<input
v-model="eventForm.isOnline"
type="checkbox"
class="rounded border-gray-300 text-blue-600 focus:ring-blue-500"
class="rounded border-default text-blue-600 focus:ring-blue-500"
/>
<span class="ml-2 text-sm text-gray-700">Online Event</span>
<span class="ml-2 text-sm text-default">Online Event</span>
</label>
<label class="flex items-center">
<input
v-model="eventForm.registrationRequired"
type="checkbox"
class="rounded border-gray-300 text-blue-600 focus:ring-blue-500"
class="rounded border-default text-blue-600 focus:ring-blue-500"
/>
<span class="ml-2 text-sm text-gray-700"
<span class="ml-2 text-sm text-default"
>Registration Required</span
>
</label>
@ -329,7 +332,7 @@
<button
type="button"
@click="cancelEdit"
class="px-4 py-2 text-gray-600 hover:text-gray-900"
class="px-4 py-2 text-muted hover:text-highlighted"
>
Cancel
</button>