-
Notifications
You must be signed in to change notification settings - Fork 60.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add fanyi add top tip #5470
add fanyi add top tip #5470
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
app/components/auth.tsx
Outdated
|
||
useEffect(() => { | ||
// 检查 localStorage 中是否有标记 | ||
const bannerDismissed = localStorage.getItem("bannerDismissed"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
app/icons/www-delete.svg
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename?
app/components/auth.tsx
Outdated
@@ -112,20 +113,21 @@ export function AuthPage() { | |||
function TopBanner() { | |||
const [isHovered, setIsHovered] = useState(false); | |||
const [isVisible, setIsVisible] = useState(true); | |||
const storage = safeLocalStorage(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
放外面
app/components/auth.tsx
Outdated
setIsVisible(true); // 显示横幅 | ||
} else if (bannerDismissed === "true") { | ||
// 如果标记为 "true",则隐藏横幅 | ||
setIsVisible(false); | ||
} | ||
}, []); | ||
}, [storage]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不需要作为组件内部的依赖项初始化storage,只需要初始化一次 不需要每次render都要初始化
Your build has completed! |
app/components/auth.tsx
Outdated
@@ -113,11 +113,10 @@ export function AuthPage() { | |||
function TopBanner() { | |||
const [isHovered, setIsHovered] = useState(false); | |||
const [isVisible, setIsVisible] = useState(true); | |||
|
|||
const [isMobile, setIsMobile] = useState(window.innerWidth < 600); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
全局搜 有判断mobile的方法
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
app/components/ui-lib.module.scss
Outdated
@@ -250,8 +250,7 @@ | |||
|
|||
.select-with-icon { | |||
position: relative; | |||
max-width: fit-content; | |||
|
|||
max-width: 60%; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不要修改全局样式!
app/components/button.module.scss
Outdated
cursor: pointer; | ||
transition: all 0.3s ease; | ||
overflow: hidden; | ||
// overflow: hidden; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不要修改全局样式!
app/components/settings.module.scss
Outdated
@@ -72,3 +72,9 @@ | |||
} | |||
} | |||
} | |||
|
|||
.SubTitle-button { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注意命名风格统一
app/components/model-config.tsx
Outdated
@@ -242,6 +243,7 @@ export function ModelConfigList(props: { | |||
subTitle={Locale.Settings.CompressModel.SubTitle} | |||
> | |||
<Select | |||
className={styles["select-model"]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里还是不太对 如果本身这个组件使用没有自己的scss文件 那么我觉得可以使用style 或者新建一个scss文件,
ui-lib一定是通用的 并不像加一些特殊的东西进去 这是规范问题
按照你这里的处理方式 ui-lib后面会加越来越多乱七八糟的style class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okok
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
📝 补充信息 | Additional Information