feat: 新增鉴权

This commit is contained in:
2026-05-22 22:38:01 +08:00
parent b02f15f735
commit 3857f77f8b
38 changed files with 1697 additions and 195 deletions
+19
View File
@@ -0,0 +1,19 @@
// app/utils/clipboard.ts - 剪贴板操作工具
const legacyCopy = (text: string) => {
const input = document.createElement("input");
input.value = text;
document.body.appendChild(input);
input.select();
document.execCommand("copy");
document.body.removeChild(input);
};
/** 复制文本,优先使用 Clipboard API,降级使用 execCommand */
export const copy = (text: string): void => {
try {
void navigator.clipboard.writeText(text);
} catch {
legacyCopy(text);
}
};