@@ -895,20 +895,36 @@ const Index = () => {
895
895
< LayoutAdjuster />
896
896
897
897
{ /* 顶部带安全提示的导航栏 */ }
898
- < div className = "bg-gradient-to-r from-blue-50 via-white to-indigo-50 border border-red-200 rounded-lg mx-4 mt-4 mb-1 py-3 px-4 shadow-sm flex-shrink-0" >
899
- < div className = "max-w-7xl mx-auto flex items-center justify-between" >
900
- < div className = "flex items-center gap-2" >
898
+ < div className = "bg-gradient-to-r from-blue-50 via-white to-indigo-50 border border-red-200 rounded-lg mx-4 mt-4 mb-1 py-4 px-4 shadow-sm flex-shrink-0 relative" >
899
+ < div className = "max-w-7xl mx-auto w-full flex items-center" >
900
+ { /* 左侧Logo部分,占据0.618前的空间 */ }
901
+ < div className = "flex items-center gap-2 w-[61.8%] md:w-[61.8%] pr-2" >
901
902
< img src = "/logo.png" alt = "Logo" className = "h-8 w-auto rounded-lg" />
902
- < span className = "text-xl font-bold tracking-tight text-gray-800" > 一站式AI绘图平台</ span >
903
+ < span className = "text-xl font-bold tracking-tight text-gray-800 truncate " > 一站式AI绘图平台</ span >
903
904
</ div >
904
- < div className = "security-banner" >
905
- < div className = "flex items-center" >
906
- < span className = "text-xs text-blue-600 font-medium" >
907
- { securityTips [ currentTip ] }
908
- </ span >
905
+
906
+ { /* 右侧Tips部分,从黄金比例(0.618)位置开始 */ }
907
+ < div className = "w-[38.2%] pr-20" >
908
+ < div className = "security-banner w-full" >
909
+ < div className = "flex items-center" >
910
+ < span className = "text-xs text-blue-600 font-medium truncate" >
911
+ { securityTips [ currentTip ] }
912
+ </ span >
913
+ </ div >
909
914
</ div >
910
915
</ div >
911
916
</ div >
917
+
918
+ { /* 调试面板按钮 - 固定在右上角 */ }
919
+ < button
920
+ className = "absolute right-4 top-1/2 transform -translate-y-1/2 bg-white shadow border text-gray-700 hover:bg-gray-50 px-3 py-1.5 rounded text-sm flex items-center gap-1 z-10"
921
+ onClick = { ( ) => document . getElementById ( 'debug-panel' ) ?. classList . toggle ( 'hidden' ) }
922
+ >
923
+ < svg width = "16" height = "16" viewBox = "0 0 24 24" fill = "none" xmlns = "http://www.w3.org/2000/svg" >
924
+ < path d = "M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10zm0 0V8m0 4h4" stroke = "currentColor" strokeWidth = "2" strokeLinecap = "round" strokeLinejoin = "round" />
925
+ </ svg >
926
+ 调试
927
+ </ button >
912
928
</ div >
913
929
914
930
{ /* 设置面板 - 条件渲染 */ }
@@ -1279,27 +1295,11 @@ const Index = () => {
1279
1295
) }
1280
1296
</ div >
1281
1297
</ div >
1282
-
1283
- < div className = "p-4 text-center text-xs text-gray-400 border-t border-gray-200 flex items-center justify-center gap-2" >
1284
- < span > © { new Date ( ) . getFullYear ( ) } Powered by Lovable</ span >
1285
- < span > |</ span >
1286
- < a
1287
- href = "https://github.com/kevin1sMe/paintbot-hub"
1288
- target = "_blank"
1289
- rel = "noopener noreferrer"
1290
- className = "text-gray-500 hover:text-gray-700 flex items-center gap-1"
1291
- >
1292
- < svg height = "16" width = "16" viewBox = "0 0 16 16" fill = "currentColor" >
1293
- < path d = "M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z" />
1294
- </ svg >
1295
- < span > GitHub</ span >
1296
- </ a >
1297
- </ div >
1298
1298
</ div >
1299
1299
</ div >
1300
1300
1301
1301
{ /* 右侧图片预览区域 - 调整为弹性布局确保历史记录始终可见 */ }
1302
- < div className = "flex-1 bg-gray-50 flex flex-col overflow-hidden" >
1302
+ < div className = "flex-1 bg-gray-50 flex flex-col overflow-hidden flex-adaptive " >
1303
1303
{ /* 滚动区域只应用于主内容,不包括历史记录 */ }
1304
1304
< div className = "p-4 flex-1 overflow-y-auto min-h-0 content-height" >
1305
1305
{ generatedImages . length > 0 || pendingImages > 0 ? (
@@ -1495,10 +1495,10 @@ const Index = () => {
1495
1495
</ div >
1496
1496
1497
1497
{ /* 历史记录区域 - 现在使用固定底部设计 */ }
1498
- < div className = { `border-t border-gray-200 bg-white flex-shrink-0 history-container md:max-h-[150px ] overflow-hidden mobile-history ${
1498
+ < div className = { `border-t border-gray-200 bg-white flex-shrink-0 history-container md:max-h-[160px ] overflow-hidden mobile-history ${
1499
1499
historyCollapsed
1500
1500
? 'max-h-[40px] min-h-[40px]'
1501
- : 'max-h-[150px ] min-h-[100px ] md:min-h-[120px ]'
1501
+ : 'max-h-[160px ] min-h-[110px ] md:min-h-[130px ]'
1502
1502
} `} >
1503
1503
< div className = "flex justify-between items-center p-3 cursor-pointer"
1504
1504
onClick = { ( ) => setHistoryCollapsed ( ! historyCollapsed ) } >
@@ -1535,15 +1535,20 @@ const Index = () => {
1535
1535
strokeWidth = "2"
1536
1536
strokeLinecap = "round"
1537
1537
strokeLinejoin = "round"
1538
- className = { ` text-gray-400 transform transition-transform ${ historyCollapsed ? 'rotate-180' : '' } ` }
1538
+ className = " text-gray-400"
1539
1539
>
1540
- < polyline points = "18 15 12 9 6 15" > </ polyline >
1540
+ { /* 根据折叠状态显示不同的箭头方向 */ }
1541
+ { historyCollapsed ? (
1542
+ < polyline points = "6 15 12 9 18 15" > </ polyline > // 收起状态时显示向下的箭头,表示可展开
1543
+ ) : (
1544
+ < polyline points = "6 9 12 15 18 9" > </ polyline > // 展开状态时显示向上的箭头,表示可收起
1545
+ ) }
1541
1546
</ svg >
1542
1547
</ div >
1543
1548
</ div >
1544
1549
1545
1550
{ ! historyCollapsed && (
1546
- < div className = "px-4 pb-3 overflow-y-auto overflow-scroll-fix" style = { { maxHeight : "100px " } } >
1551
+ < div className = "px-4 pb-3 overflow-y-auto overflow-scroll-fix" style = { { maxHeight : "110px " } } >
1547
1552
{ history . length > 0 ? (
1548
1553
< div className = "flex gap-3 overflow-x-auto pb-2" >
1549
1554
{ history . map ( ( item , index ) => (
@@ -1552,7 +1557,10 @@ const Index = () => {
1552
1557
src = { item . imgUrl }
1553
1558
alt = { item . prompt }
1554
1559
className = "w-[100px] h-[100px] object-cover rounded-md border border-gray-200"
1555
- onClick = { ( ) => handleHistoryItemClick ( item ) }
1560
+ onClick = { ( e ) => {
1561
+ e . stopPropagation ( ) ; // 阻止事件冒泡到外层div,避免触发收起操作
1562
+ handleHistoryItemClick ( item ) ;
1563
+ } }
1556
1564
/>
1557
1565
{ /* 多图标记 */ }
1558
1566
{ item . imageCount && item . imageCount > 1 && (
@@ -1567,7 +1575,10 @@ const Index = () => {
1567
1575
{ /* 悬停显示更多信息 - 添加点击事件以支持点击功能 */ }
1568
1576
< div
1569
1577
className = "absolute inset-0 bg-black bg-opacity-75 rounded-md opacity-0 group-hover:opacity-100 transition-opacity flex flex-col justify-between p-2 text-white text-xs"
1570
- onClick = { ( ) => handleHistoryItemClick ( item ) }
1578
+ onClick = { ( e ) => {
1579
+ e . stopPropagation ( ) ; // 阻止事件冒泡到外层div,避免触发收起操作
1580
+ handleHistoryItemClick ( item ) ;
1581
+ } }
1571
1582
>
1572
1583
< div className = "flex justify-between" >
1573
1584
< span > { item . model . split ( '-' ) . pop ( ) } </ span >
@@ -1609,31 +1620,31 @@ const Index = () => {
1609
1620
) }
1610
1621
</ div >
1611
1622
1612
- { /* 调试面板按钮 - 位置调整 */ }
1613
- < div className = "fixed bottom-4 right-4 z-20" >
1614
- < button
1615
- className = "bg-white shadow border text-gray-700 hover:bg-gray-50 px-3 py-1.5 rounded text-sm flex items-center gap-1"
1616
- onClick = { ( ) => document . getElementById ( 'debug-panel' ) ?. classList . toggle ( 'hidden' ) }
1617
- >
1618
- < svg width = "16" height = "16" viewBox = "0 0 24 24" fill = "none" xmlns = "http://www.w3.org/2000/svg" >
1619
- < path d = "M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10zm0 0V8m0 4h4" stroke = "currentColor" strokeWidth = "2" strokeLinecap = "round" strokeLinejoin = "round" />
1620
- </ svg >
1621
- 调试
1622
- </ button >
1623
- </ div >
1623
+ { /* 调试按钮已移至顶部导航栏 */ }
1624
1624
</ div >
1625
1625
</ div >
1626
1626
1627
+ { /* 版权信息 - 移至页面最底部 */ }
1628
+ < div className = "bg-white border-t border-gray-200 py-4 px-4 text-center text-xs text-gray-400 flex items-center justify-center gap-2 w-full flex-shrink-0 footer-copyright" >
1629
+ < span > © { new Date ( ) . getFullYear ( ) } Powered by Lovable</ span >
1630
+ < span > |</ span >
1631
+ < a
1632
+ href = "https://github.com/kevin1sMe/paintbot-hub"
1633
+ target = "_blank"
1634
+ rel = "noopener noreferrer"
1635
+ className = "text-gray-500 hover:text-gray-700 flex items-center gap-1"
1636
+ >
1637
+ < svg height = "16" width = "16" viewBox = "0 0 16 16" fill = "currentColor" >
1638
+ < path d = "M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z" />
1639
+ </ svg >
1640
+ < span > GitHub</ span >
1641
+ </ a >
1642
+ </ div >
1643
+
1627
1644
{ /* 调试面板内容 - 保持隐藏状态 */ }
1628
1645
< div id = "debug-panel" className = "hidden" >
1629
1646
< DebugPanel logs = { logs } clearLogs = { clearLogs } />
1630
1647
</ div >
1631
-
1632
- { /* 显示调试信息 */ }
1633
- < div className = "debug-info" >
1634
- inner: { typeof window !== 'undefined' ? window . innerHeight : 0 } px,
1635
- outer: { typeof window !== 'undefined' ? window . outerHeight : 0 } px
1636
- </ div >
1637
1648
</ div >
1638
1649
) ;
1639
1650
} ;
0 commit comments