<button v-if="isMember" class="submit-btn" @click="showSubmit = true"> + Night Moment </button>
-- Reactions (one row per user‑post‑emoji) CREATE TABLE reactions ( post_id BIGINT REFERENCES posts(id), user_id BIGINT REFERENCES users(vk_id), emoji TEXT CHECK (emoji IN ('heart','moon','sound','fireworks')), PRIMARY KEY (post_id, user_id, emoji) ); nevernight vk
The idea is to give the community a unique, engaging, and technically feasible addition that will keep members active, grow the audience, and reinforce the brand’s “never‑night” vibe. Name: NeverNight Live Pulse Tagline: “Feel the beat of the night, 24 × 7 – even when the world sleeps.” Returns post ID
<SubmitModal v-if="showSubmit" @close="showSubmit = false" @submitted="onSubmitted"/> </section> </template> | | POST | /api/posts/:id/vote | required | No body
-- Themes CREATE TABLE themes ( id BIGSERIAL PRIMARY KEY, name TEXT, banner_url TEXT, music_url TEXT, start_time TIMESTAMP, end_time TIMESTAMP ); | Method | Path | Auth | Description | |--------|------|------|-------------| | GET | /api/feed?limit=20&offset=0 | optional | Returns ordered list of posts for the live wall. | | POST | /api/posts | required | Payload: type, media, text, theme_id . Returns post ID. | | POST | /api/posts/:id/react | required | Payload: emoji . Returns updated counters. | | POST | /api/posts/:id/vote | required | No body. Returns success/failure. | | GET | /api/themes/current | none | Returns the active theme (banner, music). | | GET | /api/leaderboard?period=day | none | Top 10 users by night‑score. | | GET | /api/admin/pending | admin only | List of flagged posts for manual review. | | POST | /api/admin/themes | admin only | Create or update a night‑theme schedule. | | POST | /api/admin/pin/:postId | admin only | Pin a post as Night‑Master (24 h). |
-- Votes (daily) CREATE TABLE votes ( post_id BIGINT REFERENCES posts(id), user_id BIGINT REFERENCES users(vk_id), vote_date DATE, PRIMARY KEY (user_id, vote_date) );
const posts = ref([]); const currentTheme = ref({}); const showSubmit = ref(false); const socket = io(import.meta.env.VITE_WS_URL);