fix(api): use bcrypt directly instead of passlib for compatibility

This commit is contained in:
bwstudio
2026-05-21 22:18:36 +08:00
parent 7f51d200f1
commit 4651781bc3
23511 changed files with 2587254 additions and 8 deletions
+30
View File
@@ -0,0 +1,30 @@
import { NOOP } from "../../utils/functions.mjs";
//#region ../../packages/hooks/use-same-target/index.ts
const useSameTarget = (handleClick) => {
if (!handleClick) return {
onClick: NOOP,
onMousedown: NOOP,
onMouseup: NOOP
};
let mousedownTarget = false;
let mouseupTarget = false;
const onClick = (e) => {
if (mousedownTarget && mouseupTarget) handleClick(e);
mousedownTarget = mouseupTarget = false;
};
const onMousedown = (e) => {
mousedownTarget = e.target === e.currentTarget;
};
const onMouseup = (e) => {
mouseupTarget = e.target === e.currentTarget;
};
return {
onClick,
onMousedown,
onMouseup
};
};
//#endregion
export { useSameTarget };
//# sourceMappingURL=index.mjs.map