fix: errors
This commit is contained in:
@@ -384,6 +384,12 @@ input[type="search"]::-webkit-search-results-decoration {
|
||||
justify-content: center;
|
||||
z-index: 1000;
|
||||
padding: 16px;
|
||||
animation: fadeIn 0.2s ease;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
.modal.hidden {
|
||||
@@ -398,6 +404,18 @@ input[type="search"]::-webkit-search-results-decoration {
|
||||
width: 100%;
|
||||
max-height: 80vh;
|
||||
overflow-y: auto;
|
||||
animation: slideUp 0.2s ease;
|
||||
}
|
||||
|
||||
@keyframes slideUp {
|
||||
from {
|
||||
transform: translateY(20px);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: translateY(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
@@ -423,6 +441,9 @@ input[type="search"]::-webkit-search-results-decoration {
|
||||
cursor: pointer;
|
||||
border-radius: var(--radius-sm);
|
||||
transition: all 0.2s ease;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.modal-close:hover {
|
||||
@@ -430,10 +451,54 @@ input[type="search"]::-webkit-search-results-decoration {
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.modal-close svg {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
stroke: currentColor;
|
||||
stroke-width: 2;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
/* 详情内容样式 */
|
||||
.detail-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.detail-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
padding: 12px;
|
||||
background: var(--bg-secondary);
|
||||
border-radius: var(--radius-md);
|
||||
border: 1px solid var(--border-light);
|
||||
}
|
||||
|
||||
.detail-label {
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
color: var(--text-secondary);
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.detail-value {
|
||||
font-size: 16px;
|
||||
color: var(--text-primary);
|
||||
line-height: 1.5;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.detail-value:empty::before {
|
||||
content: '- -';
|
||||
color: var(--text-muted);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* 通知样式 */
|
||||
.notification {
|
||||
position: fixed;
|
||||
|
||||
@@ -205,23 +205,34 @@
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1px;
|
||||
}
|
||||
|
||||
.nav-title {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
line-height: 1.3;
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.nav-subtitle {
|
||||
font-size: 11px;
|
||||
color: var(--text-muted);
|
||||
font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.nav-description {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
margin-top: 1px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
@@ -216,9 +216,12 @@ class AppState {
|
||||
|
||||
navLinks.forEach(link => {
|
||||
const title = link.querySelector('.nav-title').textContent.toLowerCase();
|
||||
const subtitle = link.querySelector('.nav-subtitle').textContent.toLowerCase();
|
||||
const description = link.querySelector('.nav-description').textContent.toLowerCase();
|
||||
|
||||
const matches = title.includes(searchTerm) || description.includes(searchTerm);
|
||||
const matches = title.includes(searchTerm) ||
|
||||
subtitle.includes(searchTerm) ||
|
||||
description.includes(searchTerm);
|
||||
|
||||
link.style.display = matches ? 'flex' : 'none';
|
||||
link.parentElement.style.display = matches ? 'block' : 'none';
|
||||
@@ -517,7 +520,7 @@ class AppState {
|
||||
for (const [key, value] of Object.entries(data.data || {})) {
|
||||
html += `
|
||||
<div class="detail-item">
|
||||
<label class="detail-label">${key}</label>
|
||||
<div class="detail-label">${key}</div>
|
||||
<div class="detail-value">${value || ''}</div>
|
||||
</div>
|
||||
`;
|
||||
@@ -609,6 +612,7 @@ class AppState {
|
||||
// 全局函数
|
||||
window.toggleSidebar = () => app.toggleSidebar();
|
||||
window.closeSidebar = () => app.closeSidebar();
|
||||
window.toggleTheme = () => app.toggleTheme();
|
||||
window.debounceSearch = (query) => app.handleSearchInput(query);
|
||||
window.performSearch = () => {
|
||||
const searchInput = document.getElementById('searchInput');
|
||||
|
||||
Reference in New Issue
Block a user