update
This commit is contained in:
@@ -108,105 +108,127 @@ const closeForm = () => {
|
|||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: rgba(0, 0, 0, 0.6);
|
background-color: rgba(0, 0, 0, 0.6); /* 半透明背景保持不变 */
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
z-index: 1050; /* 比其他 UI 高 */
|
z-index: 1050;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-content {
|
.modal-content {
|
||||||
background-color: #ffffff; /* 强制设置不透明白色背景 */
|
background-color: var(--app-bg-color); /* 使用应用背景色 */
|
||||||
padding: 2rem;
|
padding: calc(var(--base-padding, 1rem) * 1.5); /* 使用基础内边距 */
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
|
border: 1px solid var(--border-color); /* 添加边框 */
|
||||||
|
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); /* 调整阴影 */
|
||||||
width: 90%;
|
width: 90%;
|
||||||
max-width: 500px;
|
max-width: 500px;
|
||||||
|
color: var(--text-color); /* 默认文字颜色 */
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
margin: 0 0 1.5rem 0; /* 确保顶部 margin 为 0 */
|
margin: 0 0 calc(var(--base-margin, 0.5rem) * 3) 0; /* 使用基础外边距 */
|
||||||
color: #333; /* 使用具体的颜色值 */
|
color: var(--text-color); /* 使用主要文字颜色 */
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 1.4rem; /* 调整字体大小 */
|
font-size: 1.4rem;
|
||||||
font-weight: 500; /* 调整字重 */
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-group {
|
.form-group {
|
||||||
margin-bottom: 1rem;
|
margin-bottom: var(--base-margin, 0.5rem) * 2; /* 使用基础外边距 */
|
||||||
}
|
}
|
||||||
|
|
||||||
label {
|
label {
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: var(--base-margin, 0.5rem); /* 使用基础外边距 */
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: var(--color-text-secondary);
|
color: var(--text-color-secondary); /* 使用次要文字颜色 */
|
||||||
|
font-size: 0.95rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="text"],
|
input[type="text"],
|
||||||
textarea {
|
textarea {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0.75rem;
|
padding: calc(var(--base-padding, 1rem) * 0.75); /* 使用基础内边距 */
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--border-color); /* 使用边框颜色 */
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background-color: var(--color-input-bg);
|
background-color: var(--app-bg-color); /* 输入框背景与应用背景一致 */
|
||||||
color: var(--color-text);
|
color: var(--text-color); /* 使用主要文字颜色 */
|
||||||
box-sizing: border-box; /* 确保 padding 不会撑大元素 */
|
box-sizing: border-box;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
|
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
||||||
|
}
|
||||||
|
input[type="text"]:focus,
|
||||||
|
textarea:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: var(--button-bg-color); /* 聚焦时边框使用按钮背景色 */
|
||||||
|
/* 使用按钮背景色变量创建光晕效果,移除 rgba 回退 */
|
||||||
|
box-shadow: 0 0 0 3px rgba(from var(--button-bg-color) r g b / 0.25);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
resize: vertical; /* 允许垂直调整大小 */
|
resize: vertical;
|
||||||
min-height: 80px;
|
min-height: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.required {
|
.required {
|
||||||
color: var(--color-danger);
|
color: var(--bs-danger, red); /* 使用 Bootstrap 危险色或备用色 */
|
||||||
margin-left: 0.2rem;
|
margin-left: 0.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.error-message {
|
.error-message {
|
||||||
color: var(--color-danger);
|
color: var(--bs-danger, red); /* 使用 Bootstrap 危险色或备用色 */
|
||||||
font-size: 0.85em;
|
font-size: 0.85em;
|
||||||
margin-top: 0.3rem;
|
margin-top: calc(var(--base-margin, 0.5rem) * 0.6); /* 使用基础外边距 */
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-actions {
|
.form-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
margin-top: 1.5rem;
|
margin-top: calc(var(--base-margin, 0.5rem) * 3); /* 使用基础外边距 */
|
||||||
|
padding-top: calc(var(--base-padding, 1rem) * 0.5); /* 添加顶部内边距 */
|
||||||
|
border-top: 1px solid var(--border-color); /* 添加分隔线 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.cancel-btn,
|
.cancel-btn,
|
||||||
.confirm-btn {
|
.confirm-btn {
|
||||||
padding: 0.75rem 1.5rem;
|
padding: calc(var(--base-padding, 1rem) * 0.6) calc(var(--base-padding, 1rem) * 1.2); /* 使用基础内边距 */
|
||||||
border: none;
|
border: 1px solid transparent; /* 添加透明边框以便悬停时改变 */
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 1rem;
|
font-size: 0.95rem; /* 调整字体大小 */
|
||||||
transition: background-color 0.2s ease;
|
font-weight: 500; /* 调整字重 */
|
||||||
|
transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cancel-btn {
|
.cancel-btn {
|
||||||
background-color: var(--color-bg-secondary);
|
background-color: var(--header-bg-color); /* 使用头部背景色作为次要按钮背景 */
|
||||||
color: var(--color-text);
|
color: var(--text-color); /* 使用主要文字颜色 */
|
||||||
margin-right: 0.5rem;
|
border-color: var(--border-color); /* 使用边框颜色 */
|
||||||
|
margin-right: var(--base-margin, 0.5rem); /* 使用基础外边距 */
|
||||||
}
|
}
|
||||||
.cancel-btn:hover {
|
.cancel-btn:hover {
|
||||||
background-color: var(--color-bg-tertiary);
|
background-color: darken(var(--header-bg-color, #f0f0f0), 5%); /* 悬停时稍微变暗 */
|
||||||
|
border-color: darken(var(--border-color, #cccccc), 10%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.confirm-btn {
|
.confirm-btn {
|
||||||
background-color: var(--color-primary);
|
background-color: var(--button-bg-color); /* 使用按钮背景色 */
|
||||||
color: white;
|
color: var(--button-text-color); /* 使用按钮文字颜色 */
|
||||||
|
border-color: var(--button-bg-color); /* 边框与背景同色 */
|
||||||
}
|
}
|
||||||
.confirm-btn:hover:not(:disabled) {
|
.confirm-btn:hover:not(:disabled) {
|
||||||
background-color: var(--color-primary-dark);
|
background-color: var(--button-hover-bg-color); /* 使用按钮悬停背景色 */
|
||||||
|
border-color: var(--button-hover-bg-color);
|
||||||
}
|
}
|
||||||
.confirm-btn:disabled {
|
.confirm-btn:disabled {
|
||||||
background-color: var(--color-disabled);
|
background-color: var(--text-color-secondary); /* 禁用时使用次要文字颜色作为背景 */
|
||||||
|
border-color: var(--text-color-secondary);
|
||||||
|
color: var(--app-bg-color); /* 禁用时文字颜色反转 */
|
||||||
|
opacity: 0.65;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -231,107 +231,177 @@ export default {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.connection-list {
|
.connection-list {
|
||||||
margin-top: 1rem;
|
margin-top: var(--base-margin, 0.5rem); /* Use theme variable */
|
||||||
|
font-family: var(--font-family-sans-serif, sans-serif); /* Apply base font */
|
||||||
}
|
}
|
||||||
|
|
||||||
.connection-group {
|
.connection-group {
|
||||||
margin-bottom: 1.5rem; /* 分组间距 */
|
margin-bottom: calc(var(--base-padding, 1rem) * 1.5); /* Increase spacing */
|
||||||
|
border: 1px solid var(--border-color, #eee); /* Add border to group */
|
||||||
|
border-radius: 6px; /* Add rounding */
|
||||||
|
overflow: hidden; /* Ensure child elements respect border radius */
|
||||||
|
background-color: var(--app-bg-color); /* Ensure background */
|
||||||
}
|
}
|
||||||
|
|
||||||
.group-title {
|
.group-title {
|
||||||
margin-bottom: 0.5rem;
|
margin: 0; /* Remove default margin */
|
||||||
font-size: 1.1em;
|
padding: 0.6rem var(--base-padding, 1rem); /* Adjust padding */
|
||||||
font-weight: bold;
|
font-size: 1.05em; /* Adjust font size */
|
||||||
border-bottom: 1px solid #eee;
|
font-weight: 600; /* Slightly bolder */
|
||||||
padding-bottom: 0.3rem;
|
background-color: var(--header-bg-color, #f8f9fa); /* Use header background */
|
||||||
|
color: var(--text-color, #333); /* Use text color */
|
||||||
|
border-bottom: 1px solid var(--border-color, #eee); /* Use theme border color */
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading, .error, .no-connections, .no-connections-in-group {
|
.loading, .error, .no-connections, .no-connections-in-group {
|
||||||
padding: 1rem;
|
padding: var(--base-padding, 1rem); /* Use theme variable */
|
||||||
border: 1px solid #ccc;
|
border: 1px solid var(--border-color, #ccc); /* Use theme variable */
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
margin-bottom: 1rem;
|
margin: var(--base-margin, 0.5rem); /* Add margin */
|
||||||
|
color: var(--text-color-secondary, #666); /* Use theme variable */
|
||||||
|
background-color: var(--app-bg-color); /* Use theme variable */
|
||||||
}
|
}
|
||||||
|
|
||||||
.error {
|
.error {
|
||||||
color: red;
|
color: #dc3545; /* Keep error color distinct */
|
||||||
border-color: red;
|
border-color: #f5c6cb;
|
||||||
|
background-color: #f8d7da;
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-connections {
|
.no-connections {
|
||||||
color: #666;
|
/* Style remains largely the same, but uses theme variables */
|
||||||
|
color: var(--text-color-secondary, #666);
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse; /* Keep collapsed */
|
||||||
margin-top: 1rem;
|
margin-top: 0; /* Remove margin, handled by group */
|
||||||
|
border: none; /* Remove table border, handled by group */
|
||||||
}
|
}
|
||||||
|
|
||||||
th, td {
|
th, td {
|
||||||
border: 1px solid #ddd;
|
/* border: 1px solid #ddd; */ /* Remove individual cell borders */
|
||||||
padding: 0.5rem;
|
border-bottom: 1px solid var(--border-color, #eee); /* Use bottom border */
|
||||||
|
padding: 0.75rem var(--base-padding, 1rem); /* Increase padding */
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
vertical-align: middle; /* Align vertically */
|
||||||
|
font-size: 0.9em; /* Adjust base font size */
|
||||||
|
}
|
||||||
|
tbody tr:last-child td {
|
||||||
|
border-bottom: none; /* Remove border from last row */
|
||||||
}
|
}
|
||||||
|
|
||||||
th {
|
th {
|
||||||
background-color: #f2f2f2;
|
background-color: var(--header-bg-color, #f8f9fa); /* Use header background */
|
||||||
|
color: var(--text-color-secondary, #666); /* Use secondary text color */
|
||||||
|
font-weight: 500; /* Adjust weight */
|
||||||
|
text-transform: uppercase; /* Uppercase headers */
|
||||||
|
font-size: 0.8em; /* Smaller header font */
|
||||||
|
border-bottom-width: 2px; /* Thicker bottom border */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tbody tr:hover {
|
||||||
|
background-color: var(--header-bg-color); /* Use header bg for hover */
|
||||||
|
filter: brightness(0.98); /* Subtle hover effect */
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
color: var(--text-color, #333); /* Ensure text color */
|
||||||
|
}
|
||||||
|
td:last-child { /* Actions column */
|
||||||
|
white-space: nowrap; /* Prevent buttons wrapping */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* General Button Reset (if needed, or rely on global styles) */
|
||||||
button {
|
button {
|
||||||
margin-right: 0.5rem;
|
|
||||||
padding: 0.2rem 0.5rem;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
border-radius: 4px;
|
||||||
|
transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
|
||||||
|
font-family: var(--font-family-sans-serif, sans-serif);
|
||||||
|
font-size: 0.85em; /* Slightly smaller button text */
|
||||||
|
padding: 0.3rem 0.7rem; /* Adjust padding */
|
||||||
|
margin-right: 0.4rem; /* Adjust margin */
|
||||||
|
border: 1px solid transparent; /* Start with transparent border */
|
||||||
|
line-height: 1.4; /* Adjust line height */
|
||||||
|
}
|
||||||
|
button:last-child {
|
||||||
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-button { /* 统一按钮样式 */
|
.action-button { /* Base style for action buttons */
|
||||||
padding: 0.3rem 0.6rem;
|
/* Inherits general button styles */
|
||||||
margin-right: 0.5rem;
|
min-width: 60px; /* Adjust min-width */
|
||||||
cursor: pointer;
|
|
||||||
border: none;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-size: 0.9em;
|
|
||||||
min-width: 50px; /* 给按钮一个最小宽度 */
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Specific button colors using theme variables where possible */
|
||||||
.connect-button {
|
.connect-button {
|
||||||
background-color: #28a745; /* Green */
|
background-color: #28a745; /* Keep specific green */
|
||||||
color: white;
|
color: white;
|
||||||
|
border-color: #28a745;
|
||||||
}
|
}
|
||||||
|
.connect-button:hover {
|
||||||
|
background-color: #218838;
|
||||||
|
border-color: #1e7e34;
|
||||||
|
}
|
||||||
|
|
||||||
.edit-button {
|
.edit-button {
|
||||||
background-color: #ffc107; /* Amber */
|
background-color: #ffc107; /* Keep specific amber */
|
||||||
color: #333;
|
color: #212529; /* Darker text for better contrast */
|
||||||
|
border-color: #ffc107;
|
||||||
}
|
}
|
||||||
|
.edit-button:hover {
|
||||||
|
background-color: #e0a800;
|
||||||
|
border-color: #d39e00;
|
||||||
|
}
|
||||||
|
|
||||||
.test-button {
|
.test-button {
|
||||||
background-color: #17a2b8; /* Teal */
|
background-color: #17a2b8; /* Keep specific teal */
|
||||||
color: white;
|
color: white;
|
||||||
|
border-color: #17a2b8;
|
||||||
}
|
}
|
||||||
|
.test-button:hover {
|
||||||
|
background-color: #138496;
|
||||||
|
border-color: #117a8b;
|
||||||
|
}
|
||||||
|
|
||||||
.delete-button {
|
.delete-button {
|
||||||
background-color: #dc3545; /* Red */
|
background-color: #dc3545; /* Keep specific red */
|
||||||
color: white;
|
color: white;
|
||||||
|
border-color: #dc3545;
|
||||||
}
|
}
|
||||||
|
.delete-button:hover {
|
||||||
|
background-color: #c82333;
|
||||||
|
border-color: #bd2130;
|
||||||
|
}
|
||||||
|
|
||||||
.action-button:disabled {
|
.action-button:disabled {
|
||||||
opacity: 0.6;
|
opacity: 0.65; /* Slightly adjust opacity */
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
|
background-color: var(--text-color-secondary, #6c757d); /* Use secondary text color for disabled bg */
|
||||||
|
border-color: var(--text-color-secondary, #6c757d);
|
||||||
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* 标签样式 */
|
/* Tag Styles */
|
||||||
.tag-list {
|
.tag-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 0.3rem;
|
gap: 0.4rem; /* Increase gap */
|
||||||
}
|
}
|
||||||
.tag-item {
|
.tag-item {
|
||||||
background-color: #e0e0e0;
|
background-color: var(--header-bg-color, #e9ecef); /* Use header bg or similar */
|
||||||
color: #333;
|
color: var(--text-color-secondary, #495057); /* Use secondary text color */
|
||||||
padding: 0.1rem 0.4rem;
|
padding: 0.2rem 0.5rem; /* Adjust padding */
|
||||||
border-radius: 3px;
|
border-radius: 4px; /* Match button radius */
|
||||||
font-size: 0.85em;
|
font-size: 0.8em; /* Adjust font size */
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
border: 1px solid var(--border-color, #dee2e6); /* Add subtle border */
|
||||||
}
|
}
|
||||||
.no-tags {
|
.no-tags {
|
||||||
color: #999;
|
color: var(--text-color-secondary, #999); /* Use theme variable */
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user