Skip to content

Let's use AI to Earn!

feat: 1. 视频发布选择账户默认会选择空平台修复。 2. 样式修复

gaoSirb35ed3db3c1a
diff --git a/src/app/[lng]/page.tsx b/src/app/[lng]/page.tsx
index 8ff3cbba..664e8df8 100644
--- a/src/app/[lng]/page.tsx
+++ b/src/app/[lng]/page.tsx
@@ -1,5 +1,5 @@
"use client";
export default function Home() {
- return <div style={{ minHeight: "80vh" }}>首页</div>;
+ return <div style={{ minHeight: "80vh" }}>1</div>;
}
diff --git a/src/app/[lng]/publish/components/ChooseAccountModule/components/PlatChoose.tsx b/src/app/[lng]/publish/components/ChooseAccountModule/components/PlatChoose.tsx
index 06e4b838..b7bf149b 100644
--- a/src/app/[lng]/publish/components/ChooseAccountModule/components/PlatChoose.tsx
+++ b/src/app/[lng]/publish/components/ChooseAccountModule/components/PlatChoose.tsx
@@ -103,7 +103,15 @@ const PlatChoose = memo(
// 默认平台设置
useEffect(() => {
- setActivePlat(defaultPlat || Array.from(accountMapLast.keys())[0]);
+ const defaultPlatData = Array.from(accountMapLast).find(
+ ([plat, data]) => data.length !== 0,
+ );
+ setActivePlat(
+ defaultPlat ||
+ (defaultPlatData
+ ? defaultPlatData[0]
+ : Array.from(accountMapLast.keys())[0]),
+ );
}, [accountMapLast]);
// 所有平台的账户数据
diff --git a/src/app/[lng]/publish/videoPage/video.module.scss b/src/app/[lng]/publish/videoPage/video.module.scss
index 53536454..6f77db03 100644
--- a/src/app/[lng]/publish/videoPage/video.module.scss
+++ b/src/app/[lng]/publish/videoPage/video.module.scss
@@ -148,6 +148,8 @@
justify-content: center;
flex-direction: column;
button {
+ width: 100% !important;
+ justify-content: left !important;
&:nth-of-type(1) {
margin-bottom: 5px;
}
@@ -196,6 +198,9 @@
&-chooseVideo {
width: 100%;
cursor: pointer;
+ display: flex;
+ justify-content: center;
+ align-items: center;
.videoChoose {
width: 100%;
height: 100%;
diff --git a/src/app/hooks/useCssVariables.ts b/src/app/hooks/useCssVariables.ts
index 65108714..40fea41f 100644
--- a/src/app/hooks/useCssVariables.ts
+++ b/src/app/hooks/useCssVariables.ts
@@ -19,6 +19,15 @@ const useCssVariables = (
"--theColor7",
"--theColor8",
"--theColor9",
+ "--colorPrimary1",
+ "--colorPrimary2",
+ "--colorPrimary3",
+ "--colorPrimary4",
+ "--colorPrimary5",
+ "--colorPrimary6",
+ "--colorPrimary7",
+ "--colorPrimary8",
+ "--colorPrimary9",
],
element?: HTMLElement,
): Record<string, string> => {