forked from boos/BoosAPI
feat: Add MobileDrawer component and About page, and update package version.
This commit is contained in:
@@ -7,7 +7,7 @@ type MobileDrawerProps = {
|
||||
};
|
||||
|
||||
function MobileDrawer({ open, onClose, children }: MobileDrawerProps) {
|
||||
const [shouldRender, setShouldRender] = useState(false);
|
||||
const [shouldRender, setShouldRender] = useState(open);
|
||||
const [isClosing, setIsClosing] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -26,12 +26,7 @@ function MobileDrawer({ open, onClose, children }: MobileDrawerProps) {
|
||||
|
||||
const handleClose = useCallback(() => {
|
||||
setIsClosing(true);
|
||||
const timer = setTimeout(() => {
|
||||
setShouldRender(false);
|
||||
setIsClosing(false);
|
||||
onClose();
|
||||
}, 280);
|
||||
return () => clearTimeout(timer);
|
||||
onClose();
|
||||
}, [onClose]);
|
||||
|
||||
if (!shouldRender) return null;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { tr } from '../i18n.js';
|
||||
import { SITE_DOCS_URL } from '../docsLink.js';
|
||||
|
||||
const VERSION = '1.2.0';
|
||||
const VERSION = '1.2.2';
|
||||
|
||||
const FEATURES = [
|
||||
{ icon: '🌐', title: '统一代理网关', desc: '一个 Key、一个入口,兼容 OpenAI / Claude 下游格式' },
|
||||
|
||||
Reference in New Issue
Block a user