+
+ INTRANET / EVENTS
+
+
+ COMMUNITY EVENTS
+
+
+ Post game development updates, announcements, and community polls. Public events are
+ visible to all users.
+
+
+ )}
+
+ {/* Create Event Form */}
+ {showCreateForm && (
+
+
+ CREATE NEW EVENT
+
+
+ {/* Event Type */}
+
+
+ EVENT TYPE
+
+ setEventType(e.target.value as EventType)}
+ style={{ fontSize: '0.8rem' }}
+ disabled={createPoll}
+ >
+ Announcement
+ Development Update
+ Milestone
+
+
+
+ {/* Title */}
+
+
+ TITLE
+
+ setTitle(e.target.value)}
+ style={{ fontSize: '0.85rem' }}
+ />
+
+
+ {/* Content */}
+
+
+ CONTENT
+
+
+
+ {/* Public Toggle */}
+
+
+ setIsPublic(e.target.checked)}
+ style={{ cursor: 'pointer' }}
+ />
+ Make event visible to public
+
+
+
+ {/* Poll Toggle */}
+
+
+ setCreatePoll(e.target.checked)}
+ style={{ cursor: 'pointer' }}
+ />
+ Include a community poll
+
+
+
+ {/* Poll Form */}
+ {createPoll && (
+
+
+ POLL DETAILS
+
+
+ {/* Poll Question */}
+
+
+ QUESTION
+
+ setPollQuestion(e.target.value)}
+ style={{ fontSize: '0.8rem' }}
+ />
+
+
+ {/* Poll Options */}
+
+
+ OPTIONS
+
+ {pollOptions.map((option, idx) => (
+
+ {
+ const newOptions = [...pollOptions];
+ newOptions[idx] = e.target.value;
+ setPollOptions(newOptions);
+ }}
+ style={{ fontSize: '0.8rem', flex: 1 }}
+ />
+ {pollOptions.length > 2 && (
+ {
+ setPollOptions(pollOptions.filter((_, i) => i !== idx));
+ }}
+ style={{ padding: '0.4rem 0.6rem', fontSize: '0.7rem' }}
+ >
+ ×
+
+ )}
+
+ ))}
+ {pollOptions.length < 6 && (
+
setPollOptions([...pollOptions, ''])}
+ style={{ fontSize: '0.7rem', marginTop: '0.4rem' }}
+ >
+ + Add Option
+
+ )}
+
+
+ )}
+
+ {/* Error */}
+ {error && (
+
+ {error}
+
+ )}
+
+ {/* Actions */}
+
+
+ {posting ? 'Creating...' : '> Create Event'}
+
+ {
+ setShowCreateForm(false);
+ setError('');
+ setTitle('');
+ setContent('');
+ setCreatePoll(false);
+ setPollQuestion('');
+ setPollOptions(['', '']);
+ }}
+ disabled={posting}
+ >
+ Cancel
+
+
+
+ {events.map((event) => {
+ const poll = event.pollId ? polls.find((p) => p.id === event.pollId) : undefined;
+ return ;
+ })}
+