diff --git a/desktop-client/web/src/App.jsx b/desktop-client/web/src/App.jsx
index 1b5718c..4a1f0ca 100644
--- a/desktop-client/web/src/App.jsx
+++ b/desktop-client/web/src/App.jsx
@@ -13,15 +13,17 @@ import "./styles/index.less";
import { ToastContainer } from "react-toastify";
import TopHeader from "./components/Header";
+import Footer from "./components/Footer";
import HistoryPage from "./pages/History";
import MainPage from "./pages/Download";
import ConfigCenter from "./pages/ConfigCenter";
import { useEffect, useState } from "react";
import { fetchAppVersion } from "./utils/const";
+import { version as fallbackVersion } from "../package.json";
function App() {
const [selectedTab, setSelectedTab] = useState("download");
- const [appVersion, setAppVersion] = useState("");
+ const [appVersion, setAppVersion] = useState(fallbackVersion);
useEffect(() => {
fetchAppVersion().then((version) => setAppVersion(version));
@@ -45,7 +47,7 @@ function App() {
} />
*/}
-
当前版本号:v{appVersion}
+
{/* */}
diff --git a/desktop-client/web/src/components/Footer/index.jsx b/desktop-client/web/src/components/Footer/index.jsx
new file mode 100644
index 0000000..514076b
--- /dev/null
+++ b/desktop-client/web/src/components/Footer/index.jsx
@@ -0,0 +1,44 @@
+import electronService from "@/services/electronService";
+import { PROJECT_LINKS } from "@/utils/const";
+
+import "./index.less";
+
+function FooterLink({ href, children }) {
+ const handleClick = (event) => {
+ event.preventDefault();
+ electronService.openExternalUrl(href);
+ };
+
+ return (
+
+ {children}
+
+ );
+}
+
+function Footer({ appVersion }) {
+ return (
+
+ );
+}
+
+export default Footer;
diff --git a/desktop-client/web/src/components/Footer/index.less b/desktop-client/web/src/components/Footer/index.less
new file mode 100644
index 0000000..a7fb3dd
--- /dev/null
+++ b/desktop-client/web/src/components/Footer/index.less
@@ -0,0 +1,44 @@
+.app-footer {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ z-index: 2;
+ width: 100%;
+ padding: 10px 16px;
+ background: #f5f7fa;
+ border-top: 1px solid #e8edf3;
+ font-size: 12px;
+ line-height: 1.4;
+ color: #8a939e;
+}
+
+.app-footer-inner {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ justify-content: center;
+ gap: 0;
+ max-width: 960px;
+ margin: 0 auto;
+}
+
+.app-footer-link {
+ color: var(--secondary-color);
+ text-decoration: none;
+ white-space: nowrap;
+}
+
+.app-footer-link:hover {
+ color: var(--primary-color);
+ text-decoration: underline;
+}
+
+.app-footer-sep {
+ margin: 0 10px;
+ color: #c5ccd4;
+}
+
+.app-footer-version {
+ color: #9aa3ad;
+ white-space: nowrap;
+}
diff --git a/desktop-client/web/src/styles/index.less b/desktop-client/web/src/styles/index.less
index b6f3c75..3731b5a 100644
--- a/desktop-client/web/src/styles/index.less
+++ b/desktop-client/web/src/styles/index.less
@@ -29,7 +29,7 @@ body {
}
.main-content {
- padding: 80px 0 40px;
+ padding: 80px 0 52px;
width: 100%;
height: 100%;
overflow: hidden;
@@ -146,16 +146,6 @@ input:checked + .slider:before {
transform: translateX(24px);
}
-.app-footer {
- position: fixed;
- bottom: 0;
- width: 100%;
- text-align: center;
- padding-bottom: 16px;
- font-size: 12px;
- color: #999;
-}
-
/* 按钮样式 */
.btn {
padding: 14px 28px;
diff --git a/desktop-client/web/src/utils/const.tsx b/desktop-client/web/src/utils/const.tsx
index f8a1d34..1374d5a 100644
--- a/desktop-client/web/src/utils/const.tsx
+++ b/desktop-client/web/src/utils/const.tsx
@@ -6,6 +6,13 @@ export const THEME_COLOR = "#5c89ff"; // --primary-l
export const G_EmptyStr = "-";
+export const PROJECT_LINKS = {
+ discussions: "https://github.com/Hommy-master/capcut-mate/discussions",
+ docs: "https://docs.jcaigc.cn",
+ github: "https://github.com/Hommy-master/capcut-mate",
+ gitee: "https://gitee.com/taohongmin-gitee/capcut-mate",
+};
+
export const fetchAppVersion = async () => {
let appVersion = version;
try {