Skip to content

Commit 69a82d0

Browse files
committed
feat: add api site and v4 link
1 parent fae936d commit 69a82d0

File tree

5 files changed

+23
-9
lines changed

5 files changed

+23
-9
lines changed

.vitepress/components/FooterChinese.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@
5555
>视频教程</a
5656
>
5757
<a href="https://www.bilibili.com/video/BV1jg411H7qE">RTS 分享</a>
58-
<a
59-
href="https://apifox.com/apidoc/shared-25b77980-8f42-42f3-b1b3-9b36275c2439"
60-
>API</a
61-
>
6258
</div>
6359

6460
<div class="link-column">

.vitepress/components/SurveillanceCamera.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ const init = () => {
9292
9393
// 创建渲染器
9494
renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });
95-
renderer.setSize(container.value.clientWidth / container.value.clientHeight);
95+
renderer.setSize(container.value.clientWidth, container.value.clientHeight); // 修正: 使用实际宽度和高度
9696
renderer.setClearColor(0x000000, 0); // 设置透明背景
9797
container.value.appendChild(renderer.domElement);
9898

.vitepress/config.mts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import translations from "./i18n";
33
const nav = {
44
en: [],
55
zh: [
6+
{
7+
text: 'v4', link : 'http://v4.monibuca.com'
8+
},
69
{
710
text: '联系我们', link: '/#contact'
811
}
@@ -21,6 +24,7 @@ const commonThemeConfig = (locales: '' | 'zh' | 'en' = '', translation = transla
2124
{ text: translation.nav.quickStart, link: locales + '/#quickstart' },
2225
{ text: translation.nav.plugins, link: locales + '/#plugins' },
2326
{ text: translation.nav.admin, link: locales + '/#admin' },
27+
{ text: 'API', link: 'https://monibuca.apifox.cn' },
2428
{ text: translation.nav.pricing, link: locales + '/#pricing' },
2529
...nav[locales || 'zh']
2630
],

.vitepress/theme/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ export default {
2222
setup() {
2323
// Theme setup
2424
if (typeof window !== 'undefined') {
25+
// 设置默认暗黑模式
26+
const htmlElement = document.documentElement;
27+
htmlElement.classList.add('dark');
28+
2529
// Client-side only code
2630
const { pathname } = window.location;
2731
const isRoot = pathname === '/' || pathname === '/index.html';

deploy.sh

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,21 @@ fi
3434
# Start deployment
3535
echo -e "${YELLOW}Starting deployment...${NC}"
3636

37+
# Delete remote assets directory first
38+
echo "Removing existing assets directory on server..."
39+
ssh ${REMOTE_USER}@${REMOTE_HOST} "rm -rf ${REMOTE_DIR}/assets"
40+
if [ $? -ne 0 ]; then
41+
echo -e "${RED}Failed to remove remote assets directory. Continuing anyway...${NC}"
42+
fi
43+
3744
# Transfer files
38-
echo "Uploading files to server..."
39-
scp -r ${SOURCE_DIR}/* ${REMOTE_PATH}
45+
echo "Uploading index.html to server..."
46+
scp ${SOURCE_DIR}/index.html ${REMOTE_PATH}/
47+
48+
echo "Uploading assets directory to server..."
49+
scp -r ${SOURCE_DIR}/assets ${REMOTE_PATH}/
4050

41-
# Check if the scp command was successful
51+
# Check if the scp commands were successful
4252
if [ $? -eq 0 ]; then
4353
echo -e "${GREEN}Deployment completed successfully!${NC}"
4454
echo -e "Your website should now be available at ${YELLOW}https://v5.monibuca.com${NC}"
@@ -47,4 +57,4 @@ else
4757
exit 1
4858
fi
4959

50-
echo -e "${GREEN}All done!${NC}"
60+
echo -e "${GREEN}All done!${NC}"

0 commit comments

Comments
 (0)