feat: 书库导入导出/图片变体/书籍搜索/小组件运行时等
新增: - 书库导入导出(library_import/library_export)及测试 - 图片变体生成(image_variants)与响应式图片(responsiveImage) - 书籍搜索(bookSearch)+ BookSearch/LibrarySearchGrid 组件 - 小组件运行时(widgetRuntime)与静态检查(widgetLint) - 上传缓存中间件(upload_cache)与字体 CSS 提取脚本 其它: - 后端 handlers/services 全量调整 - 前端页面、组件、库函数与配置更新
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import type { Metadata } from "next";
|
||||
import { cookies } from "next/headers";
|
||||
import { notFound } from "next/navigation";
|
||||
import { Megaphone } from "lucide-react";
|
||||
import { Megaphone, Pin } from "lucide-react";
|
||||
import { fetchAnnouncementDetail, fetchOverview } from "@/lib/api";
|
||||
import { authCookieHeader } from "@/lib/cookies";
|
||||
import { getMeCached, getPublicSettingsCached } from "@/lib/serverData";
|
||||
import { isAdminOrAbove } from "@/lib/roles";
|
||||
import { hasPerm, PERMS } from "@/lib/roles";
|
||||
import { extractToc, estimateReadingMinutes, markdownHeadingToc } from "@/lib/toc";
|
||||
import MarkdownBody from "@/components/MarkdownBody";
|
||||
import PostToc from "@/components/PostToc";
|
||||
@@ -59,7 +59,7 @@ export default async function AnnouncementPage({ params }: PageProps) {
|
||||
const loginHref = `/login?redirect=${encodeURIComponent(`/announcement/${id}`)}`;
|
||||
const sidebarPages = overview?.sidebar_pages ?? [];
|
||||
const announcements = overview?.announcements ?? [];
|
||||
const canManagePages = !!me.user && isAdminOrAbove(me.user.role);
|
||||
const canManagePages = !!me.user && hasPerm(me.user, PERMS.PAGES);
|
||||
const siteLead = settings.site_description?.trim() || undefined;
|
||||
const urlStyle = settings.url_style;
|
||||
const toc = extractToc(a.content);
|
||||
@@ -116,7 +116,11 @@ export default async function AnnouncementPage({ params }: PageProps) {
|
||||
showTimeOfDay
|
||||
badges={
|
||||
<>
|
||||
{a.pinned ? <span className="badge-pin">置顶</span> : null}
|
||||
{a.pinned ? (
|
||||
<span className="badge-pin" title="置顶" aria-label="置顶">
|
||||
<Pin size={12} fill="currentColor" strokeWidth={2.2} aria-hidden />
|
||||
</span>
|
||||
) : null}
|
||||
<span className={`j13-anno-tag is-${a.tag_color}`}>{a.tag}</span>
|
||||
</>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user