Files
Jyotisha/frontend/src/lib/client-report-export.ts
T
jesse-uxandClaude Code f125fae0a0
Independent Staging Quality Gate / validate (push) Failing after 11m16s
Independent Staging Quality Gate / publish (push) Skipped
feat(reports): streamline reader actions and center export dialog
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-24 20:43:35 +08:00

16 lines
527 B
TypeScript

/** Browser restrictions for the local Markdown export dialog. */
export function detectPrintRestriction(userAgent?: string): {
restricted: boolean;
message?: string;
} {
const ua = typeof userAgent === "string" ? userAgent : typeof navigator !== "undefined" ? navigator.userAgent : "";
if (/MicroMessenger/i.test(ua)) {
return {
restricted: true,
message: "微信内置浏览器可能无法完整打印,请在系统浏览器中打开本页后打印。",
};
}
return { restricted: false };
}