This commit is contained in:
2025-12-21 12:04:57 +08:00
parent 78927afd7a
commit 7c9072c594
3 changed files with 28 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "@kevisual/kevisual-home", "name": "@kevisual/kevisual-home",
"version": "0.0.6", "version": "0.0.7",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"basename": "/root/home", "basename": "/root/home",
@@ -10,7 +10,7 @@
"preview": "astro preview", "preview": "astro preview",
"ui": "pnpm dlx shadcn@latest add ", "ui": "pnpm dlx shadcn@latest add ",
"prepub": "pnpm run build", "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": [], "keywords": [],
"author": "abearxiong <xiongxiao@xiongxiao.me> (https://www.xiongxiao.me)", "author": "abearxiong <xiongxiao@xiongxiao.me> (https://www.xiongxiao.me)",

24
src/apps/beian.tsx Normal file
View File

@@ -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 (
<div className="text-center text-sm text-gray-500 my-2">
<a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener noreferrer" className="hover:underline">
{beianInfo.beian}
</a>
</div>
);
}

View File

@@ -9,6 +9,7 @@ import { ToastContainer } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css'; import 'react-toastify/dist/ReactToastify.css';
import { useHomeStore } from './store'; import { useHomeStore } from './store';
import { nanoid } from 'nanoid'; import { nanoid } from 'nanoid';
import { Beian } from '../beian';
const useFocus = () => { const useFocus = () => {
const inputRef = useRef<HTMLInputElement>(null); const inputRef = useRef<HTMLInputElement>(null);
useEffect(() => { useEffect(() => {
@@ -88,5 +89,6 @@ export const AppProvider = () => {
<Nav /> <Nav />
<App /> <App />
<ToastContainer /> <ToastContainer />
<Beian />
</XProvider>; </XProvider>;
} }