diff --git a/netlify/functions/webcal.ts b/netlify/functions/webcal.ts index 6a878df..ba3d74a 100644 --- a/netlify/functions/webcal.ts +++ b/netlify/functions/webcal.ts @@ -46,12 +46,12 @@ export const handler: Handler = async (event) => { const PLAYER_ROLE = "player"; function sessionToIcal({ session, userId, role }) { - let title = `RUNNING - ${session.game_id.title}`; + let title = `${session.game_id.title} (Game Facilitator)`; if (role === PLAYER_ROLE) { title = session.rsvps.indexOf(userId) < session.participant_count - ? `CONFIRMED - ${session.game_id.title}` - : `WAITLIST - ${session.game_id.title}`; + ? `${session.game_id.title} (Confirmed Player)` + : `${session.game_id.title} (Waitlisted Player)`; } return { uid: `${session.id}#${userId}@playabl`, diff --git a/src/api/profiles.ts b/src/api/profiles.ts index f75b7d5..8d50765 100644 --- a/src/api/profiles.ts +++ b/src/api/profiles.ts @@ -48,6 +48,17 @@ export async function createWebCalForUser(userId: string) { if (data) return data; } +export async function deleteWebCalForUser(webcalId: string) { + const { error } = await supabase + .from("user_calendars") + .delete() + .eq("webcal_id", webcalId); + if (error) { + log(error); + throw error; + } +} + export async function loadWebCalForUser(userId: string) { const { data, error } = await supabase .from("user_calendars") diff --git a/src/components/Buttons/SecondaryButton.vue b/src/components/Buttons/SecondaryButton.vue index ab04f91..696b25b 100644 --- a/src/components/Buttons/SecondaryButton.vue +++ b/src/components/Buttons/SecondaryButton.vue @@ -26,6 +26,8 @@ const props = defineProps({ }); const colorClasses = computed(() => { switch (props.color) { + case "green": + return "bg-green-200 hover:bg-green-300 text-green-900"; case "blue": return "bg-blue-100 hover:bg-blue-200 text-blue-700"; case "gray": diff --git a/src/pages/Profile/SettingsPage.vue b/src/pages/Profile/SettingsPage.vue index dabb6a0..b853e48 100644 --- a/src/pages/Profile/SettingsPage.vue +++ b/src/pages/Profile/SettingsPage.vue @@ -13,7 +13,7 @@