更新动态路径,和IP管理的badge显示
This commit is contained in:
@@ -8,7 +8,7 @@ type Props = {
|
||||
collapsed?: boolean
|
||||
}
|
||||
|
||||
// 简化的菜单配置 - 扁平结构,支持分组
|
||||
// 菜单配置 - 扁平结构,支持分组
|
||||
const MENU_ITEMS = [
|
||||
{
|
||||
group: '官网教程',
|
||||
@@ -70,10 +70,10 @@ const MENU_ITEMS = [
|
||||
export default function Sidebar({collapsed = false}: Props) {
|
||||
const pathname = usePathname()
|
||||
|
||||
// 获取当前文档 key (从 /help/{key} 路径中提取)
|
||||
// 获取当前文档 key
|
||||
const getCurrentKey = useCallback(() => {
|
||||
const parts = pathname?.split('/') || []
|
||||
return parts[2] || '' // /help/{key} -> key
|
||||
return parts[2] || ''
|
||||
}, [pathname])
|
||||
|
||||
const currentKey = getCurrentKey()
|
||||
|
||||
@@ -240,9 +240,9 @@ export default function ChannelsPage(props: ChannelsPageProps) {
|
||||
) : hasAuth ? (
|
||||
<div className="flex flex-col">
|
||||
<span>账号密码</span>
|
||||
<div className="px-2 py-1 bg-gray-100 rounded text-sm text-gray-700 font-mono break-all max-w-[120px]">
|
||||
<Badge variant="secondary">
|
||||
{channel.username}:{channel.password}
|
||||
</div>
|
||||
</Badge >
|
||||
</div>
|
||||
) : (
|
||||
<span className="text-sm text-gray-400">无认证</span>
|
||||
|
||||
Reference in New Issue
Block a user