mirror of
https://github.com/polaroi8d/cactoide.git
synced 2026-03-22 14:15:28 +00:00
Compare commits
2 Commits
fix/permis
...
handmade
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9cc10e47e6 | ||
|
|
d18afc43da |
@@ -2,6 +2,7 @@ services:
|
||||
# Database
|
||||
postgres:
|
||||
image: postgres:15-alpine
|
||||
restart: unless-stopped
|
||||
container_name: cactoide-db
|
||||
environment:
|
||||
POSTGRES_DB: ${POSTGRES_DB:-cactoide_database}
|
||||
@@ -28,7 +29,8 @@ services:
|
||||
|
||||
# Application
|
||||
app:
|
||||
image: ghcr.io/polaroi8d/cactoide/cactoide:${APP_VERSION:-latest}
|
||||
image: cactoide:handmade
|
||||
restart: unless-stopped
|
||||
build: .
|
||||
container_name: cactoide-app
|
||||
ports:
|
||||
@@ -46,7 +48,6 @@ services:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- cactoide-network
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
|
||||
@@ -6,12 +6,6 @@
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
||||
%sveltekit.head%
|
||||
|
||||
<!-- Remove if you don't want to use analytics -->
|
||||
<script
|
||||
defer
|
||||
src="https://analytics.dalev.hu/script.js"
|
||||
data-website-id="7425d098-e340-4464-bd03-c2e47b004cd9"
|
||||
></script>
|
||||
</head>
|
||||
<body data-sveltekit-preload-data="hover">
|
||||
<div style="display: contents">%sveltekit.body%</div>
|
||||
|
||||
@@ -103,16 +103,16 @@
|
||||
"instance": "Instance"
|
||||
},
|
||||
"home": {
|
||||
"title": "Cactoide - The RSVP site",
|
||||
"title": "RSVP | Handmade Cities",
|
||||
"description": "Create and manage event RSVPs. No registration required, instant sharing.",
|
||||
"mainTitle": "Cactoide(ea)",
|
||||
"subtitle": "The Ultimate RSVP Platform",
|
||||
"tagline": "A federated mobile-first event RSVP platform that lets you create events, share unique URLs, and collect RSVPs without any registration required. With built-in federation, discover and share events across a decentralized network of instances.",
|
||||
"mainTitle": "Cactoide",
|
||||
"subtitle": "Handmade's Preferred RSVP System",
|
||||
"tagline": "Create, share, and manage events with zero friction.",
|
||||
"openSourceTitle": "Open Source & Self-Hostable",
|
||||
"openSourceDescription": "Cactoide is open source and easily self-hostable. View the source code, contribute, or host your own instance.",
|
||||
"viewOnGitHub": "View on GitHub",
|
||||
"whyCactoideTitle": "Why Cactoide(ae)?🌵",
|
||||
"whyCactoideDescription": "Like the cactus, great events bloom under any condition when managed with care. Cactoide(ae) helps you streamline RSVPs, simplify coordination, and keep every detail efficient—so your gatherings are resilient, vibrant, and unforgettable.",
|
||||
"whyCactoideTitle": "Why Cactoide?",
|
||||
"whyCactoideDescription": "Cactoide is lightweight and open source. Meetup Hosts should ALWAYS create private events. We currently don't prevent strangers from spamming public ones:",
|
||||
"createEventNow": "Create Event Now",
|
||||
"discoverPublicEventsTitle": "Discover Public Events",
|
||||
"discoverPublicEventsDescription": "See what others are planning and get inspired",
|
||||
@@ -146,7 +146,7 @@
|
||||
"ctaButton": "Create"
|
||||
},
|
||||
"create": {
|
||||
"title": "Create Event - Cactoide",
|
||||
"title": "Create Event - Handmade Cities",
|
||||
"formTitle": "Create New Event",
|
||||
"eventNameLabel": "Name",
|
||||
"eventNamePlaceholder": "Enter event name",
|
||||
@@ -179,10 +179,10 @@
|
||||
"createEventButton": "Create Event"
|
||||
},
|
||||
"event": {
|
||||
"title": "{eventName} - Cactoide",
|
||||
"eventTitle": "Event - Cactoide",
|
||||
"editTitle": "Edit Event - {eventName} - Cactoide",
|
||||
"myEventsTitle": "My Events - Cactoide",
|
||||
"title": "{eventName} - Handmade Cities",
|
||||
"eventTitle": "Event - Handmade Cities",
|
||||
"editTitle": "Edit Event - {eventName} - Handmade Cities",
|
||||
"myEventsTitle": "My Events - Handmade Cities",
|
||||
"eventNotFoundTitle": "Event Not Found",
|
||||
"eventNotFoundDescription": "The event you're looking for doesn't exist or has been removed.",
|
||||
"joinThisEvent": "Join This Event",
|
||||
@@ -230,7 +230,7 @@
|
||||
"inviteLinkExpiresAt": "This link expires when the event starts: {time}"
|
||||
},
|
||||
"discover": {
|
||||
"title": "Discover Events - Cactoide",
|
||||
"title": "Discover Events - Handmade Cities",
|
||||
"noPublicEventsTitle": "No Public Events Yet",
|
||||
"noPublicEventsDescription": "There are no public events available at the moment. Be the first to create one!",
|
||||
"createButton": "Create",
|
||||
@@ -283,13 +283,13 @@
|
||||
"downloadICalDescription": "Download .ics file for any calendar app"
|
||||
},
|
||||
"errors": {
|
||||
"title": "Error - Cactoide",
|
||||
"title": "Error - Handmade Cities",
|
||||
"errorTitle": "Error",
|
||||
"anUnexpectedErrorOccurred": "An unexpected error occurred.",
|
||||
"homeButton": "Home"
|
||||
},
|
||||
"layout": {
|
||||
"defaultTitle": "Cactoide -",
|
||||
"defaultTitle": "Handmade Cities -",
|
||||
"defaultDescription": "Create and manage event RSVPs",
|
||||
"userIdCookieText": "Your UserID stored as a cookie:",
|
||||
"firstTimeVisiting": "First time visiting. Generating new UserID...",
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
import CalendarModal from '$lib/components/CalendarModal.svelte';
|
||||
import type { CalendarEvent } from '$lib/calendarHelpers.js';
|
||||
import { t } from '$lib/i18n/i18n.js';
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
export let data: { event: Event; rsvps: RSVP[]; userId: string };
|
||||
type FormDataLocal = { success?: boolean; error?: string; type?: 'add' | 'remove' | 'copy' };
|
||||
@@ -27,6 +28,17 @@
|
||||
let typeToShow: 'add' | 'remove' | 'copy' | undefined;
|
||||
let successHideTimer: number | null = null;
|
||||
|
||||
// Compute eventId early so reactive blocks can use it.
|
||||
const eventId = $page.params.id || '';
|
||||
|
||||
// client-only origin (empty during SSR).
|
||||
let origin = '';
|
||||
|
||||
// Safe: Only runs in browser.
|
||||
onMount(() => {
|
||||
origin = window.location.origin;
|
||||
});
|
||||
|
||||
// Use server-side data
|
||||
$: event = data.event;
|
||||
$: rsvps = data.rsvps;
|
||||
@@ -40,10 +52,26 @@
|
||||
date: event.date,
|
||||
time: event.time,
|
||||
location: event.location,
|
||||
url: `${$page.url.origin}/event/${eventId}`
|
||||
// Fallback to relative path on server render.
|
||||
url: origin ? `${origin}/event/${eventId}` : `/event/${eventId}`
|
||||
};
|
||||
}
|
||||
|
||||
const copyEventLink = () => {
|
||||
if (browser && isEventCreator) {
|
||||
const url = origin ? `${origin}/event/${eventId}` : `${location.origin}/event/${eventId}`;
|
||||
navigator.clipboard.writeText(url).then(() => {
|
||||
toastType = 'copy';
|
||||
success = t('event.eventLinkCopied');
|
||||
|
||||
setTimeout(() => {
|
||||
success = '';
|
||||
toastType = null;
|
||||
}, 3000);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// Handle form errors from server
|
||||
$: if (form?.error) {
|
||||
error = String(form.error);
|
||||
@@ -79,22 +107,7 @@
|
||||
// Derive toast type from local or server form
|
||||
$: typeToShow = toastType ?? form?.type;
|
||||
|
||||
const eventId = $page.params.id || '';
|
||||
|
||||
const copyEventLink = () => {
|
||||
if (browser && isEventCreator) {
|
||||
const url = `${$page.url.origin}/event/${eventId}`;
|
||||
navigator.clipboard.writeText(url).then(() => {
|
||||
toastType = 'copy';
|
||||
success = t('event.eventLinkCopied');
|
||||
|
||||
setTimeout(() => {
|
||||
success = '';
|
||||
toastType = null;
|
||||
}, 3000);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const clearMessages = () => {
|
||||
error = '';
|
||||
@@ -476,7 +489,7 @@
|
||||
bind:isOpen={showCalendarModal}
|
||||
event={calendarEvent}
|
||||
{eventId}
|
||||
baseUrl={$page.url.origin}
|
||||
baseUrl={origin}
|
||||
on:close={closeCalendarModal}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 162 KiB |
Reference in New Issue
Block a user