refactor: Modularize UI components and utilities
- Extract UI components into separate JS files - Centralize configuration values in config.js - Introduce a dedicated logger module - Improve file tree drag-and-drop and undo functionality - Refactor modal handling to a single manager - Add URL routing support for SPA navigation - Implement view mode for read-only access
This commit is contained in:
@@ -2,10 +2,21 @@
|
||||
.preview-pane {
|
||||
font-size: 16px;
|
||||
line-height: 1.6;
|
||||
color: var(--text-primary);
|
||||
background-color: var(--bg-primary);
|
||||
}
|
||||
|
||||
.preview-pane h1, .preview-pane h2, .preview-pane h3,
|
||||
.preview-pane h4, .preview-pane h5, .preview-pane h6 {
|
||||
#preview {
|
||||
color: var(--text-primary);
|
||||
background-color: var(--bg-primary);
|
||||
}
|
||||
|
||||
.preview-pane h1,
|
||||
.preview-pane h2,
|
||||
.preview-pane h3,
|
||||
.preview-pane h4,
|
||||
.preview-pane h5,
|
||||
.preview-pane h6 {
|
||||
margin-top: 24px;
|
||||
margin-bottom: 16px;
|
||||
font-weight: 600;
|
||||
@@ -137,6 +148,7 @@ body.dark-mode .context-menu {
|
||||
transform: translateX(400px);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translateX(0);
|
||||
opacity: 1;
|
||||
@@ -152,6 +164,7 @@ body.dark-mode .context-menu {
|
||||
transform: translateX(0);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translateX(400px);
|
||||
opacity: 0;
|
||||
@@ -205,4 +218,62 @@ body.dark-mode .modal-footer {
|
||||
color: var(--text-primary);
|
||||
border-color: var(--link-color);
|
||||
box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
|
||||
}
|
||||
|
||||
/* Directory Preview Styles */
|
||||
.directory-preview {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.directory-preview h2 {
|
||||
margin-bottom: 20px;
|
||||
/* color: var(--text-primary); */
|
||||
}
|
||||
|
||||
.directory-files {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
||||
gap: 16px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.file-card {
|
||||
background-color: var(--bg-tertiary);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 8px;
|
||||
padding: 16px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.file-card:hover {
|
||||
background-color: var(--bg-secondary);
|
||||
border-color: var(--link-color);
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.file-card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.file-card-header i {
|
||||
color: var(--link-color);
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.file-card-name {
|
||||
font-weight: 500;
|
||||
color: var(--text-primary);
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.file-card-description {
|
||||
font-size: 13px;
|
||||
color: var(--text-secondary);
|
||||
line-height: 1.4;
|
||||
margin-top: 8px;
|
||||
}
|
||||
Reference in New Issue
Block a user