Ship signup sheet, subscribe reminders, cover crop, and theme updates.

Wire real WeChat app config, prefer activity cover over posters, and add admin cover cropping for the home banner.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Michelle Zan
2026-10-08 13:06:43 +08:00
co-authored by Cursor
parent cd05113755
commit 0ca2e87bf2
35 changed files with 968 additions and 184 deletions
+15 -1
View File
@@ -33,7 +33,11 @@ const SEED = {
],
posters: [],
signups: [],
checkinCodes: []
checkinCodes: [],
settings: {
// 微信公众平台 → 订阅消息 → 选用「活动提醒」类模板后填入模板 ID
subscribeTmplId: process.env.WX_SUBSCRIBE_TMPL_ID || ''
}
}
const COLLECTIONS = ['users', 'admins', 'adminAllowlist', 'activities', 'posters', 'signups', 'checkinCodes']
@@ -49,6 +53,16 @@ function normalize(data) {
dirty = true
}
})
if (!data.settings || typeof data.settings !== 'object') {
data.settings = { subscribeTmplId: process.env.WX_SUBSCRIBE_TMPL_ID || '' }
dirty = true
} else if (typeof data.settings.subscribeTmplId !== 'string') {
data.settings.subscribeTmplId = process.env.WX_SUBSCRIBE_TMPL_ID || ''
dirty = true
} else if (!data.settings.subscribeTmplId && process.env.WX_SUBSCRIBE_TMPL_ID) {
data.settings.subscribeTmplId = process.env.WX_SUBSCRIBE_TMPL_ID
dirty = true
}
// The allowlist is the only source of truth for mini-program admins.
data.users.forEach((user) => {