diff --git a/packages/frontend/src/components/AddConnectionForm.vue b/packages/frontend/src/components/AddConnectionForm.vue index f326b94..27959d1 100644 --- a/packages/frontend/src/components/AddConnectionForm.vue +++ b/packages/frontend/src/components/AddConnectionForm.vue @@ -194,86 +194,86 @@ const handleSubmit = async () => {

{{ formTitle }}

-
-
- - -
-
- - -
-
- - -
-
- - -
+ +
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
- -
- - - -
- - -
- - - -
- - -
-
- - - +
-
+ +
+ + +
+ +
+
+ + +
+
+
+
+ {{ t('connections.form.keyUpdateNote') }} +
-
- {{ t('connections.form.keyUpdateNote') }} -
-
- -
- - - -
{{ t('proxies.loading') }}
+ +
{{ t('proxies.loading') }}
{{ t('proxies.error', { error: proxyStoreError }) }}
-
+
- -
- - - -
+
+ + +
+
- -
- {{ formError || storeError }} -
+ +
+ {{ formError || storeError }} +
+
- - +
@@ -300,9 +300,11 @@ const handleSubmit = async () => { padding: calc(var(--base-padding, 1rem) * 2); border-radius: 8px; box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25); /* 调整阴影 */ - min-width: 350px; /* 稍微加宽 */ - max-width: 550px; /* 调整最大宽度 */ + min-width: 350px; + max-width: 750px; /* 增加最大宽度以容纳两列 */ + width: 80vw; /* 宽度适应视口 */ border: 1px solid var(--border-color, #ccc); + /* 移除 max-height 和 flex 布局 */ } h3 { @@ -313,10 +315,34 @@ h3 { font-family: var(--font-family-sans-serif, sans-serif); font-size: 1.4em; /* 稍微增大标题字号 */ font-weight: 600; /* 加粗标题 */ + flex-shrink: 0; /* 防止标题被压缩 */ + padding-bottom: calc(var(--base-padding, 1rem) * 1); /* 增加标题和内容间距 */ } +/* 移除 .form-content 滚动相关样式 */ + +/* 两列布局样式 */ +.form-fields.two-columns { + display: flex; + flex-wrap: wrap; /* 允许换行,虽然主要目的是两列 */ + gap: calc(var(--base-padding, 1rem) * 2); /* 列之间的间距 */ +} + +.form-column { + flex: 1; /* 每列占据可用空间 */ + min-width: 250px; /* 设置最小宽度,防止列过窄 */ +} + +/* 错误消息跨列 */ +.full-width-error { + width: 100%; /* 占据父容器(.two-columns)的全部宽度 */ + order: 99; /* 确保错误消息在列之后显示 */ + margin-top: var(--base-margin, 0.5rem); /* 与上方元素保持间距 */ +} + + .form-group { - margin-bottom: calc(var(--base-margin, 0.5rem) * 2.5); /* 增加组间距 */ + margin-bottom: calc(var(--base-margin, 0.5rem) * 2); /* 保持组间距 */ } label { @@ -356,7 +382,7 @@ textarea:focus { } textarea { - min-height: 80px; /* 设置文本域最小高度 */ + min-height: 60px; /* 减小文本域最小高度 */ resize: vertical; /* 允许垂直调整大小 */ } @@ -399,9 +425,10 @@ select { .form-actions { display: flex; justify-content: flex-end; - margin-top: calc(var(--base-margin, 0.5rem) * 4); /* 增加顶部间距 */ + margin-top: calc(var(--base-margin, 0.5rem) * 2); /* 减少顶部间距 */ padding-top: calc(var(--base-padding, 1rem) * 1); /* 在按钮上方增加间距 */ border-top: 1px solid var(--border-color, #eee); /* 添加分隔线 */ + /* 移除 flex-shrink 和背景色、内外边距调整 */ } .form-actions button {