From 7c9072c5941f6d6bf1212c248dc1a635b6672da2 Mon Sep 17 00:00:00 2001 From: abearxiong Date: Sun, 21 Dec 2025 12:04:57 +0800 Subject: [PATCH] temp --- package.json | 4 ++-- src/apps/beian.tsx | 24 ++++++++++++++++++++++++ src/apps/home/index.tsx | 2 ++ 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 src/apps/beian.tsx diff --git a/package.json b/package.json index b54de74..d51826a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kevisual/kevisual-home", - "version": "0.0.6", + "version": "0.0.7", "description": "", "main": "index.js", "basename": "/root/home", @@ -10,7 +10,7 @@ "preview": "astro preview", "ui": "pnpm dlx shadcn@latest add ", "prepub": "pnpm run build", - "pub": "envision deploy ./dist -k home -v 0.0.6 -u -y yes" + "pub": "envision deploy ./dist -k home -v 0.0.7 -u -y yes" }, "keywords": [], "author": "abearxiong (https://www.xiongxiao.me)", diff --git a/src/apps/beian.tsx b/src/apps/beian.tsx new file mode 100644 index 0000000..26536b7 --- /dev/null +++ b/src/apps/beian.tsx @@ -0,0 +1,24 @@ + +const beianList = [ + { + hostname: 'https://kevisual.xiongxiao.me', + beian: '蜀ICP备16031039号-2' + }, + { + hostname: 'https://kevisual.cn', + beian: '浙ICP备2025158778号' + } +] + +export const Beian = () => { + const hostname = window.location.hostname; + const beianInfo = beianList.find(item => hostname.includes(item.hostname.replace('https://', '').replace('http://', ''))); + if (!beianInfo) return null; + return ( +
+ + {beianInfo.beian} + +
+ ); +} \ No newline at end of file diff --git a/src/apps/home/index.tsx b/src/apps/home/index.tsx index 34266be..2ab4f1d 100644 --- a/src/apps/home/index.tsx +++ b/src/apps/home/index.tsx @@ -9,6 +9,7 @@ import { ToastContainer } from 'react-toastify'; import 'react-toastify/dist/ReactToastify.css'; import { useHomeStore } from './store'; import { nanoid } from 'nanoid'; +import { Beian } from '../beian'; const useFocus = () => { const inputRef = useRef(null); useEffect(() => { @@ -88,5 +89,6 @@ export const AppProvider = () => {