WG/src/components/ConfigViewer.css
2026-01-26 00:31:12 +08:00

220 lines
3.5 KiB
CSS

.config-viewer-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1001;
}
.config-viewer {
background: white;
border-radius: 8px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
max-width: 900px;
width: 95%;
max-height: 85vh;
display: flex;
flex-direction: column;
overflow: hidden;
}
.viewer-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
border-bottom: 1px solid #eee;
flex-shrink: 0;
}
.viewer-header h2 {
margin: 0;
font-size: 18px;
color: #333;
}
.close-btn {
background: none;
border: none;
font-size: 24px;
cursor: pointer;
color: #999;
padding: 0;
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
}
.close-btn:hover {
color: #333;
}
.viewer-content {
display: flex;
gap: 20px;
flex: 1;
overflow: hidden;
padding: 20px;
}
.config-list {
min-width: 200px;
max-width: 250px;
border-right: 1px solid #eee;
padding-right: 20px;
overflow-y: auto;
}
.config-list h3 {
margin: 0 0 10px 0;
font-size: 14px;
color: #333;
}
.config-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px;
margin-bottom: 8px;
background: #f5f5f5;
border-radius: 4px;
font-size: 13px;
gap: 8px;
}
.config-item span {
flex: 1;
word-break: break-all;
}
.download-btn {
background: none;
border: none;
cursor: pointer;
font-size: 16px;
padding: 0;
flex-shrink: 0;
}
.config-preview {
flex: 1;
display: flex;
flex-direction: column;
min-width: 400px;
overflow: hidden;
}
.preview-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
}
.preview-header h3 {
margin: 0;
font-size: 14px;
color: #333;
}
.copy-btn {
padding: 6px 12px;
background: #1677ff;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 12px;
font-weight: 500;
transition: background 0.3s;
}
.copy-btn:hover {
background: #0b66d4;
}
.config-text {
flex: 1;
background: #f5f5f5;
border: 1px solid #ddd;
border-radius: 4px;
padding: 12px;
overflow: auto;
font-size: 12px;
line-height: 1.5;
color: #333;
margin: 0;
font-family: 'Courier New', monospace;
}
.viewer-actions {
display: flex;
gap: 10px;
padding: 20px;
border-top: 1px solid #eee;
flex-shrink: 0;
}
.btn-download-all,
.btn-close {
padding: 10px 16px;
border: none;
border-radius: 4px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
}
.btn-download-all {
flex: 1;
background: #52c41a;
color: white;
}
.btn-download-all:hover:not(:disabled) {
background: #389e0d;
box-shadow: 0 2px 8px rgba(82, 196, 26, 0.3);
}
.btn-download-all:disabled {
background: #ccc;
cursor: not-allowed;
}
.btn-close {
flex: 1;
background: #f5f5f5;
color: #333;
}
.btn-close:hover {
background: #e6e6e6;
}
@media (max-width: 768px) {
.viewer-content {
flex-direction: column;
}
.config-list {
max-width: none;
border-right: none;
border-bottom: 1px solid #eee;
padding-right: 0;
padding-bottom: 15px;
}
.config-preview {
min-width: auto;
}
}