feat(面板): 实现浮动面板拖拽功能并优化样式
添加面板拖拽功能,允许用户通过标题栏拖动面板。重构面板样式,移除固定位置属性,改为居中显示并支持动态调整。同时添加语言面板状态管理,优化面板动画效果。
This commit is contained in:
@@ -182,26 +182,28 @@ body {
|
||||
z-index: 999;
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
max-height: 80vh;
|
||||
overflow: hidden;
|
||||
animation: panelSlideIn 0.2s ease-out;
|
||||
}
|
||||
|
||||
.floating-panel.visible {
|
||||
display: flex;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
@keyframes panelSlideIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(10px);
|
||||
transform: translate(-50%, -50%) translateY(10px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
transform: translate(-50%, -50%) translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.floating-panel.visible {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.panel-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@@ -246,10 +248,8 @@ body {
|
||||
|
||||
/* ===== 连接配置面板 ===== */
|
||||
.config-panel {
|
||||
bottom: calc(var(--spacing-xl) + 60px);
|
||||
right: var(--spacing-xl);
|
||||
width: 360px;
|
||||
max-height: 70vh;
|
||||
}
|
||||
|
||||
.config-section {
|
||||
@@ -338,6 +338,7 @@ body {
|
||||
bottom: calc(var(--spacing-xl) + 60px);
|
||||
right: var(--spacing-xl);
|
||||
width: 320px;
|
||||
max-height: 90vh;
|
||||
}
|
||||
|
||||
.caption-style-section {
|
||||
@@ -364,7 +365,6 @@ body {
|
||||
|
||||
/* ===== 语言切换面板 ===== */
|
||||
.language-panel {
|
||||
bottom: calc(var(--spacing-xl) + 60px);
|
||||
right: var(--spacing-xl);
|
||||
width: 280px;
|
||||
}
|
||||
@@ -408,10 +408,8 @@ body {
|
||||
|
||||
/* ===== 日志面板 ===== */
|
||||
.log-panel {
|
||||
bottom: calc(var(--spacing-xl) + 60px);
|
||||
right: var(--spacing-xl);
|
||||
width: 450px;
|
||||
max-height: 60vh;
|
||||
}
|
||||
|
||||
.log-toolbar {
|
||||
|
||||
Reference in New Issue
Block a user