This commit is contained in:
Baobhan Sith
2025-04-17 23:26:39 +08:00
parent 725519a672
commit 643a53fd8e
2 changed files with 168 additions and 76 deletions
@@ -231,107 +231,177 @@ export default {
<style scoped>
.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 {
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 {
margin-bottom: 0.5rem;
font-size: 1.1em;
font-weight: bold;
border-bottom: 1px solid #eee;
padding-bottom: 0.3rem;
margin: 0; /* Remove default margin */
padding: 0.6rem var(--base-padding, 1rem); /* Adjust padding */
font-size: 1.05em; /* Adjust font size */
font-weight: 600; /* Slightly bolder */
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 {
padding: 1rem;
border: 1px solid #ccc;
padding: var(--base-padding, 1rem); /* Use theme variable */
border: 1px solid var(--border-color, #ccc); /* Use theme variable */
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 {
color: red;
border-color: red;
color: #dc3545; /* Keep error color distinct */
border-color: #f5c6cb;
background-color: #f8d7da;
}
.no-connections {
color: #666;
/* Style remains largely the same, but uses theme variables */
color: var(--text-color-secondary, #666);
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 1rem;
border-collapse: collapse; /* Keep collapsed */
margin-top: 0; /* Remove margin, handled by group */
border: none; /* Remove table border, handled by group */
}
th, td {
border: 1px solid #ddd;
padding: 0.5rem;
/* border: 1px solid #ddd; */ /* Remove individual cell borders */
border-bottom: 1px solid var(--border-color, #eee); /* Use bottom border */
padding: 0.75rem var(--base-padding, 1rem); /* Increase padding */
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 {
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 {
margin-right: 0.5rem;
padding: 0.2rem 0.5rem;
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 { /* 统一按钮样式 */
padding: 0.3rem 0.6rem;
margin-right: 0.5rem;
cursor: pointer;
border: none;
border-radius: 4px;
font-size: 0.9em;
min-width: 50px; /* 给按钮一个最小宽度 */
.action-button { /* Base style for action buttons */
/* Inherits general button styles */
min-width: 60px; /* Adjust min-width */
text-align: center;
}
/* Specific button colors using theme variables where possible */
.connect-button {
background-color: #28a745; /* Green */
background-color: #28a745; /* Keep specific green */
color: white;
border-color: #28a745;
}
.connect-button:hover {
background-color: #218838;
border-color: #1e7e34;
}
.edit-button {
background-color: #ffc107; /* Amber */
color: #333;
background-color: #ffc107; /* Keep specific amber */
color: #212529; /* Darker text for better contrast */
border-color: #ffc107;
}
.edit-button:hover {
background-color: #e0a800;
border-color: #d39e00;
}
.test-button {
background-color: #17a2b8; /* Teal */
background-color: #17a2b8; /* Keep specific teal */
color: white;
border-color: #17a2b8;
}
.test-button:hover {
background-color: #138496;
border-color: #117a8b;
}
.delete-button {
background-color: #dc3545; /* Red */
background-color: #dc3545; /* Keep specific red */
color: white;
border-color: #dc3545;
}
.delete-button:hover {
background-color: #c82333;
border-color: #bd2130;
}
.action-button:disabled {
opacity: 0.6;
opacity: 0.65; /* Slightly adjust opacity */
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 {
display: flex;
flex-wrap: wrap;
gap: 0.3rem;
gap: 0.4rem; /* Increase gap */
}
.tag-item {
background-color: #e0e0e0;
color: #333;
padding: 0.1rem 0.4rem;
border-radius: 3px;
font-size: 0.85em;
background-color: var(--header-bg-color, #e9ecef); /* Use header bg or similar */
color: var(--text-color-secondary, #495057); /* Use secondary text color */
padding: 0.2rem 0.5rem; /* Adjust padding */
border-radius: 4px; /* Match button radius */
font-size: 0.8em; /* Adjust font size */
white-space: nowrap;
border: 1px solid var(--border-color, #dee2e6); /* Add subtle border */
}
.no-tags {
color: #999;
color: var(--text-color-secondary, #999); /* Use theme variable */
font-style: italic;
}
</style>