527 lines
8.8 KiB
CSS
527 lines
8.8 KiB
CSS
/* 配置管理系统样式 */
|
|
|
|
/* 全局样式 */
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
}
|
|
|
|
body {
|
|
background-color: #f5f5f5;
|
|
color: #333;
|
|
}
|
|
|
|
/* 容器样式 */
|
|
.config-container {
|
|
display: flex;
|
|
height: 100vh;
|
|
width: 100vw;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* 侧边栏样式 */
|
|
.sidebar {
|
|
width: 300px;
|
|
background-color: white;
|
|
border-right: 1px solid #e0e0e0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.sidebar-header {
|
|
padding: 20px;
|
|
border-bottom: 1px solid #e0e0e0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 15px;
|
|
background-color: white;
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.sidebar-header h1 {
|
|
font-size: 1.3rem;
|
|
font-weight: 700;
|
|
color: #2c3e50;
|
|
margin: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
/* 改进添加配置容器的样式 */
|
|
.add-config-container {
|
|
width: 100%;
|
|
display: flex;
|
|
gap: 10px;
|
|
align-items: center;
|
|
}
|
|
|
|
/* 配置类型标签 */
|
|
.config-type-label {
|
|
font-weight: 600;
|
|
color: #2c3e50;
|
|
font-size: 0.95rem;
|
|
margin-right: 10px;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
/* 美化下拉选择框 */
|
|
#configTypeSelect {
|
|
flex: 1;
|
|
padding: 10px 12px;
|
|
border: 2px solid #e1e8ed;
|
|
border-radius: 8px;
|
|
background-color: white;
|
|
color: #333;
|
|
font-size: 0.95rem;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
outline: none;
|
|
}
|
|
|
|
#configTypeSelect:hover {
|
|
border-color: #4a90e2;
|
|
}
|
|
|
|
#configTypeSelect:focus {
|
|
border-color: #4a90e2;
|
|
box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
|
|
}
|
|
|
|
/* 美化添加按钮 - 已移除 */
|
|
|
|
/* 必填项星号样式 */
|
|
.required {
|
|
color: #e74c3c;
|
|
font-weight: bold;
|
|
margin-left: 2px;
|
|
}
|
|
|
|
/* 复选框组样式 */
|
|
.checkbox-group {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
|
gap: 10px;
|
|
margin-top: 8px;
|
|
background-color: #f9f9f9;
|
|
padding: 15px;
|
|
border-radius: 8px;
|
|
border: 1px solid #e0e0e0;
|
|
max-height: 200px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.checkbox-group label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
cursor: pointer;
|
|
font-weight: normal;
|
|
margin: 0;
|
|
padding: 5px 8px;
|
|
border-radius: 4px;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.checkbox-group label:hover {
|
|
background-color: #e8f0fe;
|
|
}
|
|
|
|
.checkbox-group input[type="checkbox"] {
|
|
width: 16px;
|
|
height: 16px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.config-list {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 10px;
|
|
}
|
|
|
|
.config-item {
|
|
padding: 15px;
|
|
margin-bottom: 8px;
|
|
background-color: white;
|
|
border-radius: 10px;
|
|
cursor: pointer;
|
|
border-left: 4px solid transparent;
|
|
transition: all 0.2s ease;
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
|
border: 1px solid #e0e0e0;
|
|
}
|
|
|
|
.config-item:hover {
|
|
background-color: #f8fbff;
|
|
border-left-color: #4a90e2;
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
|
|
}
|
|
|
|
.config-item.active {
|
|
background-color: #e8f0fe;
|
|
border-left-color: #4a90e2;
|
|
box-shadow: 0 2px 6px rgba(74, 144, 226, 0.15);
|
|
}
|
|
|
|
.config-item-content {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 12px;
|
|
}
|
|
|
|
.config-item-icon {
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: 8px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 1.2rem;
|
|
flex-shrink: 0;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
/* 不同类型配置的图标背景色 */
|
|
.config-item[data-type="database"] .config-item-icon {
|
|
background-color: #e3f2fd;
|
|
color: #1976d2;
|
|
}
|
|
|
|
.config-item[data-type="folder"] .config-item-icon {
|
|
background-color: #e8f5e9;
|
|
color: #388e3c;
|
|
}
|
|
|
|
.config-item-details {
|
|
flex: 1;
|
|
}
|
|
|
|
.config-item-title {
|
|
font-weight: 600;
|
|
margin-bottom: 6px;
|
|
color: #2c3e50;
|
|
font-size: 0.95rem;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.config-item-info {
|
|
font-size: 0.85rem;
|
|
color: #666;
|
|
line-height: 1.4;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.config-item-meta {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.config-item-time {
|
|
font-size: 0.75rem;
|
|
color: #999;
|
|
}
|
|
|
|
.config-item-actions {
|
|
display: flex;
|
|
gap: 5px;
|
|
}
|
|
|
|
.config-item-action {
|
|
width: 24px;
|
|
height: 24px;
|
|
border-radius: 4px;
|
|
border: none;
|
|
background-color: transparent;
|
|
color: #999;
|
|
font-size: 0.8rem;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.config-item-action:hover {
|
|
background-color: #f0f0f0;
|
|
color: #666;
|
|
}
|
|
|
|
.sidebar-footer {
|
|
padding: 15px;
|
|
border-top: 1px solid #e0e0e0;
|
|
display: flex;
|
|
gap: 10px;
|
|
}
|
|
|
|
.refresh-btn {
|
|
width: 100%;
|
|
padding: 10px;
|
|
border: none;
|
|
border-radius: 6px;
|
|
background-color: #f0f0f0;
|
|
color: #333;
|
|
cursor: pointer;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.refresh-btn:hover {
|
|
background-color: #e0e0e0;
|
|
}
|
|
|
|
/* 主配置区域样式 */
|
|
.config-main {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.welcome-screen {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background-color: #fafafa;
|
|
}
|
|
|
|
.welcome-content {
|
|
text-align: center;
|
|
padding: 40px;
|
|
}
|
|
|
|
.welcome-content h2 {
|
|
margin-bottom: 10px;
|
|
color: #333;
|
|
}
|
|
|
|
.welcome-content p {
|
|
color: #666;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.config-screen {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.config-header {
|
|
padding: 20px;
|
|
border-bottom: 1px solid #e0e0e0;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
background-color: white;
|
|
}
|
|
|
|
.config-title {
|
|
font-size: 1.4rem;
|
|
font-weight: 600;
|
|
color: #333;
|
|
}
|
|
|
|
.config-actions {
|
|
display: flex;
|
|
gap: 10px;
|
|
}
|
|
|
|
.save-btn, .delete-btn {
|
|
padding: 8px 16px;
|
|
border: none;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
font-size: 0.9rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.save-btn {
|
|
background-color: #28a745;
|
|
color: white;
|
|
}
|
|
|
|
.save-btn:hover {
|
|
background-color: #218838;
|
|
}
|
|
|
|
.delete-btn {
|
|
background-color: #dc3545;
|
|
color: white;
|
|
}
|
|
|
|
.delete-btn:hover {
|
|
background-color: #c82333;
|
|
}
|
|
|
|
.config-form {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 20px;
|
|
background-color: #fafafa;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 20px;
|
|
background-color: white;
|
|
padding: 15px;
|
|
border-radius: 8px;
|
|
border: 1px solid #e0e0e0;
|
|
}
|
|
|
|
.form-group label {
|
|
display: block;
|
|
margin-bottom: 5px;
|
|
font-weight: 600;
|
|
color: #333;
|
|
}
|
|
|
|
.form-group input, .form-group select, .form-group textarea {
|
|
width: 100%;
|
|
padding: 10px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 4px;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.form-group textarea {
|
|
min-height: 100px;
|
|
resize: vertical;
|
|
}
|
|
|
|
.form-group.checkbox {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.form-group.checkbox input {
|
|
width: auto;
|
|
}
|
|
|
|
.section-title {
|
|
font-size: 1.2rem;
|
|
font-weight: 600;
|
|
margin: 30px 0 15px 0;
|
|
color: #333;
|
|
border-bottom: 2px solid #4a90e2;
|
|
padding-bottom: 5px;
|
|
}
|
|
|
|
/* 模态框样式 */
|
|
.modal {
|
|
display: none;
|
|
position: fixed;
|
|
z-index: 1000;
|
|
left: 0;
|
|
top: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
overflow: auto;
|
|
background-color: rgba(0,0,0,0.5);
|
|
}
|
|
|
|
.modal.show {
|
|
display: block;
|
|
}
|
|
|
|
.modal-content {
|
|
background-color: white;
|
|
margin: 10% auto;
|
|
padding: 0;
|
|
border-radius: 8px;
|
|
width: 500px;
|
|
box-shadow: 0 4px 20px rgba(0,0,0,0.15);
|
|
}
|
|
|
|
.modal-header {
|
|
padding: 20px;
|
|
border-bottom: 1px solid #e0e0e0;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.modal-header h3 {
|
|
font-size: 1.2rem;
|
|
font-weight: 600;
|
|
color: #333;
|
|
}
|
|
|
|
.close-btn {
|
|
background: none;
|
|
border: none;
|
|
font-size: 1.5rem;
|
|
cursor: pointer;
|
|
color: #666;
|
|
}
|
|
|
|
.close-btn:hover {
|
|
color: #333;
|
|
}
|
|
|
|
.modal-body {
|
|
padding: 20px;
|
|
}
|
|
|
|
.modal-footer {
|
|
padding: 15px 20px;
|
|
border-top: 1px solid #e0e0e0;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 10px;
|
|
}
|
|
|
|
.btn {
|
|
padding: 8px 16px;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 0.9rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.btn.primary {
|
|
background-color: #4a90e2;
|
|
color: white;
|
|
}
|
|
|
|
.btn.primary:hover {
|
|
background-color: #357abd;
|
|
}
|
|
|
|
.btn.secondary {
|
|
background-color: #f0f0f0;
|
|
color: #333;
|
|
}
|
|
|
|
.btn.secondary:hover {
|
|
background-color: #e0e0e0;
|
|
}
|
|
|
|
.btn.danger {
|
|
background-color: #dc3545;
|
|
color: white;
|
|
}
|
|
|
|
.btn.danger:hover {
|
|
background-color: #c82333;
|
|
}
|
|
|
|
/* 响应式设计 */
|
|
@media (max-width: 768px) {
|
|
.sidebar {
|
|
width: 250px;
|
|
}
|
|
|
|
.modal-content {
|
|
width: 90%;
|
|
margin: 15% auto;
|
|
}
|
|
} |