@@ -17,6 +17,7 @@ import {
1717 TbMenu2 ,
1818 TbLayersIntersect ,
1919 TbSettings ,
20+ TbAdjustments ,
2021} from "solid-icons/tb"
2122import { BsPlayCircleFill , BsCardImage } from "solid-icons/bs"
2223import { BiSolidBookContent } from "solid-icons/bi"
@@ -85,7 +86,7 @@ export const GlobalSidebar = () => {
8586 } )
8687
8788 const isVisible = createMemo ( ( ) => ! isMobile ( ) || sidebarVisible ( ) )
88- const sidebarWidth = createMemo ( ( ) => ( sidebarCollapsed ( ) ? "48px" : "128px " ) )
89+ const sidebarWidth = createMemo ( ( ) => ( sidebarCollapsed ( ) ? "48px" : "130px " ) )
8990
9091 // Logo:从设置读取,支持亮/暗两套(与 Header.tsx 保持完全一致)
9192 const logos = getSetting ( "logo" ) . split ( "\n" )
@@ -152,6 +153,12 @@ export const GlobalSidebar = () => {
152153 if ( isMobile ( ) ) setSidebarVisible ( false )
153154 }
154155
156+ // ─── 系统设置跳转 ─────────────────────────────────────────
157+ const handleSettings = ( ) => {
158+ window . location . href = joinBase ( "/@manage/settings/site" )
159+ if ( isMobile ( ) ) setSidebarVisible ( false )
160+ }
161+
155162 // ─── 透明模式切换 ─────────────────────────────────────────
156163 const toggleTransparent = ( ) => {
157164 const next = ! sidebarTransparent ( )
@@ -409,6 +416,7 @@ export const GlobalSidebar = () => {
409416 padding : sidebarCollapsed ( ) ? "8px 0" : "8px 8px" ,
410417 "border-top" : `1px solid ${ borderColor ( ) } ` ,
411418 display : "flex" ,
419+ "flex-direction" : sidebarCollapsed ( ) ? "column" : "row" ,
412420 "align-items" : "center" ,
413421 "justify-content" : sidebarCollapsed ( ) ? "center" : "space-between" ,
414422 gap : "6px" ,
@@ -446,54 +454,83 @@ export const GlobalSidebar = () => {
446454 < Icon as = { isDark ( ) ? FiSun : FiMoon } boxSize = "15px" />
447455 </ button >
448456
449- { /* 透明模式切换(折叠时隐藏) */ }
450- < Show when = { ! sidebarCollapsed ( ) } >
451- < button
452- onClick = { toggleTransparent }
453- title = { sidebarTransparent ( ) ? "关闭透明模式" : "开启透明模式" }
454- style = { {
455- background : sidebarTransparent ( )
456- ? isDark ( )
457- ? "rgba(6,182,212,0.18)"
458- : "rgba(6,182,212,0.10)"
459- : btnBg ( ) ,
460- border : `1px solid ${ sidebarTransparent ( ) ? "rgba(6,182,212,0.35)" : btnBorder ( ) } ` ,
461- "border-radius" : "7px" ,
462- height : "28px" ,
463- padding : "0 8px" ,
464- cursor : "pointer" ,
465- display : "flex" ,
466- "align-items" : "center" ,
467- gap : "4px" ,
468- "font-size" : "11px" ,
469- color : sidebarTransparent ( )
470- ? isDark ( )
471- ? "#67e8f9"
472- : "#0891b2"
473- : textSecondary ( ) ,
474- "font-weight" : sidebarTransparent ( ) ? "600" : "400" ,
475- transition : "all 0.18s ease" ,
476- "white-space" : "nowrap" ,
477- } }
478- onMouseEnter = { ( e ) => {
479- if ( ! sidebarTransparent ( ) ) {
480- const el = e . currentTarget as HTMLButtonElement
481- el . style . background = isDark ( )
482- ? "rgba(6,182,212,0.10)"
483- : "rgba(6,182,212,0.06)"
484- }
485- } }
486- onMouseLeave = { ( e ) => {
487- if ( ! sidebarTransparent ( ) ) {
488- ; ( e . currentTarget as HTMLButtonElement ) . style . background =
489- btnBg ( )
490- }
491- } }
492- >
493- < Icon as = { TbLayersIntersect } boxSize = "14px" />
494- 透明
495- </ button >
496- </ Show >
457+ { /* 系统设置 */ }
458+ < button
459+ onClick = { handleSettings }
460+ title = "系统设置"
461+ style = { {
462+ background : btnBg ( ) ,
463+ border : `1px solid ${ btnBorder ( ) } ` ,
464+ "border-radius" : "7px" ,
465+ width : "28px" ,
466+ height : "28px" ,
467+ cursor : "pointer" ,
468+ display : "flex" ,
469+ "align-items" : "center" ,
470+ "justify-content" : "center" ,
471+ color : textSecondary ( ) ,
472+ transition : "all 0.18s ease" ,
473+ "flex-shrink" : "0" ,
474+ } }
475+ onMouseEnter = { ( e ) => {
476+ const el = e . currentTarget as HTMLButtonElement
477+ el . style . background = isDark ( )
478+ ? "rgba(59,130,246,0.15)"
479+ : "rgba(59,130,246,0.08)"
480+ el . style . color = "#3b82f6"
481+ } }
482+ onMouseLeave = { ( e ) => {
483+ const el = e . currentTarget as HTMLButtonElement
484+ el . style . background = btnBg ( )
485+ el . style . color = textSecondary ( )
486+ } }
487+ >
488+ < Icon as = { TbAdjustments } boxSize = "15px" />
489+ </ button >
490+
491+ { /* 透明模式切换 */ }
492+ < button
493+ onClick = { toggleTransparent }
494+ title = { sidebarTransparent ( ) ? "关闭透明模式" : "开启透明模式" }
495+ style = { {
496+ background : sidebarTransparent ( )
497+ ? isDark ( )
498+ ? "rgba(6,182,212,0.18)"
499+ : "rgba(6,182,212,0.10)"
500+ : btnBg ( ) ,
501+ border : `1px solid ${ sidebarTransparent ( ) ? "rgba(6,182,212,0.35)" : btnBorder ( ) } ` ,
502+ "border-radius" : "7px" ,
503+ width : "28px" ,
504+ height : "28px" ,
505+ cursor : "pointer" ,
506+ display : "flex" ,
507+ "align-items" : "center" ,
508+ "justify-content" : "center" ,
509+ color : sidebarTransparent ( )
510+ ? isDark ( )
511+ ? "#67e8f9"
512+ : "#0891b2"
513+ : textSecondary ( ) ,
514+ transition : "all 0.18s ease" ,
515+ "flex-shrink" : "0" ,
516+ } }
517+ onMouseEnter = { ( e ) => {
518+ if ( ! sidebarTransparent ( ) ) {
519+ const el = e . currentTarget as HTMLButtonElement
520+ el . style . background = isDark ( )
521+ ? "rgba(6,182,212,0.10)"
522+ : "rgba(6,182,212,0.06)"
523+ }
524+ } }
525+ onMouseLeave = { ( e ) => {
526+ if ( ! sidebarTransparent ( ) ) {
527+ ; ( e . currentTarget as HTMLButtonElement ) . style . background =
528+ btnBg ( )
529+ }
530+ } }
531+ >
532+ < Icon as = { TbLayersIntersect } boxSize = "15px" />
533+ </ button >
497534 </ div >
498535 </ div >
499536
0 commit comments