Files
personal/lib/workItems.ts
T
virtheart d666cedfc6 feat: Next.js 后端 + SQLite + 暗门后台 /virtheart + 服务咨询页
后端(node:sqlite 零原生依赖,data/site.db,WAL + busy_timeout 抗并发):
- works / service_items / site_config / inquiries / admin_users / admin_sessions / captcha_challenges
- API:admin 登录登出/密码、作品与服务 CRUD、图片上传、留言箱、
  验证码 challenge/verify、咨询提交(一次性滑块令牌防重放)

后台 /virtheart(仅手动访问,未登录一律 307 → /virtheart/login):
- 服务端布局鉴权 + DB 会话(httpOnly cookie 7 天)+ CSRF 头校验
- 概览 / 作品(上传、网格预设、发布开关)/ 服务 / 留言箱 / 配置(全站文案)
- 设计与主站同语言:暗底点阵、mono、lime 选中,非传统后台模板

公开站:
- 路由组 (site) 隔离站点壳层;首页/服务页文案全部 DB 驱动即时生效
- /services 服务菜单 + 留言表单 + 全屏居中滑块拼图验证码(对齐缺口)
- 提交入 inquiries 并 SMTP(飞书 notify@)邮件通知 chenchun@virtheart.com
- Header 新增「服务」菜单;旧作品清理,空状态自动接管
- 根布局仅承载字体/全局样式,后台无站点壳层

验证:登录/CSRF/发布隔离/滑块容错/令牌单次消费/SMTP 真发全部通过;
lint 与基线一致(119 errors 均为存量)。
2026-09-02 18:34:18 +08:00

31 lines
997 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* WORK_ITEMS — from the original d59f7a97fb1c563f.js (module 28116),
* including the passcode-protected first entry (the grid filters it via
* `WORK_ITEMS.filter(t => !t.passcodeProtected || lookup(t.href))` — the
* locked one reveals the brand label "小红书"; see WorkSection).
*
* Internal detail routes render app/work/[slug]/page.tsx; clicks go through
* the cover/reveal transition (startNavigation).
*/
import { revealBrandLabel } from "@/lib/passcode";
export type WorkItem = {
name: string;
imageUrl: string;
hoverImageUrl: string;
href: string;
year: string;
type: "post" | "tools" | "event";
gridClass: string;
codingProject?: boolean;
passcodeProtected?: boolean;
};
export const SELECTED_WORK_SECTION_ID = "selected-work";
/**
* 作品数据已迁移至 SQLite(site_config + works 表),由后台管理。
* 此处保留类型定义;运行时数据通过 lib/siteConfig.ts 从 DB 读取。
*/
export const WORK_ITEMS: WorkItem[] = [];